js hash change event 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);