JavaScript bind to hashchange event

Bind a function to the hash change event.

function hashChange() {
    console.info('hash changed!');
}
 
window.addEventListener('hashchange', hashChange, false);
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment