Skip to content

Instantly share code, notes, and snippets.

@Plou
Created June 13, 2013 16:17
Show Gist options
  • Save Plou/5775060 to your computer and use it in GitHub Desktop.
Save Plou/5775060 to your computer and use it in GitHub Desktop.
Javacript code to get the hash from an url (given or current)
$.getHash = function(url){
return url ? url.substring(url.indexOf('#')+1) : window.location.hash;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment