var hash = window.location.hash; if(hash) { var elem = document.getElementById(hash.substr(1)); if(elem) elem.click(); }