change hash event javascript code example
Example: hash change listener js
window.addEventListener('hashchange', function() {
console.log('The hash has changed!')
}, false);
window.addEventListener('hashchange', function() {
console.log('The hash has changed!')
}, false);