I have the following code
$(document).ready(function() { if (\"onhashchange\" in window) { alert(\"The browser supports the hashchange event!\");
The new hashchange event in HTML5 is supported by all current browsers; no need to fool your browser into thinking it's IE8.
This code works in IE 9, FF 5, Safari 5, and Chrome 12 on Win 7:
Hash Change Test