how to check hash is in the url in jquery code example
Example 1: javascript change url hash
window.location.hash = '#hash_value';
Example 2: Javascript check for hash in URL
if (location.href.indexOf("#") != -1) {
//current url has a #hash in it
}