Skip to content

Instantly share code, notes, and snippets.

@jbail
Created December 22, 2012 22:37
Show Gist options
  • Select an option

  • Save jbail/4361577 to your computer and use it in GitHub Desktop.

Select an option

Save jbail/4361577 to your computer and use it in GitHub Desktop.
Demonstrating a simple hashchange event listener
window.onhashchange = function () {
updateTheViewOrDoSomethingElseAwesome(window.location.hash);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment