JavaScript bind to hashchange event

Content

Bind a function to the hash change event.

function hashChange() {     console.info('hash changed!'); }   window.addEventListener('hashchange', hashChange, false);