How can I check if a URL has changed in JavaScript? For example, websites like GitHub, which use AJAX, will append page information after a # symbol to create a unique URL w
use this code
window.onhashchange = function() { //code }
with jQuery
$(window).bind('hashchange', function() { //code });