Skip to content

Instantly share code, notes, and snippets.

@mbjordan
Created July 17, 2013 22:13
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 mbjordan/6025026 to your computer and use it in GitHub Desktop.
Save mbjordan/6025026 to your computer and use it in GitHub Desktop.
Simply read the hash both on page load and for every hash change.
window.onhashchange = doChange;
window.onload = doChange;
function doChange() {
var _hash = window.location.hash.replace("#!", "");
console.log(_hash);
}
@mbjordan
Copy link
Author

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