js check hash in url code example
Example: Javascript check for hash in URL
if (location.href.indexOf("#") != -1) {
//current url has a #hash in it
}
if (location.href.indexOf("#") != -1) {
//current url has a #hash in it
}