Skip to content

Instantly share code, notes, and snippets.

@digitup
Created December 20, 2012 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitup/4345596 to your computer and use it in GitHub Desktop.
Save digitup/4345596 to your computer and use it in GitHub Desktop.
JS - Check URL hash
function checkHash(backButton) {
if(window.location.hash) {
backButton = true;
} else {
backButton = false;
}
return backButton;
}
@kylwes
Copy link

kylwes commented Jun 2, 2018

isn't this way easier?
return (window.location.hash)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment