javascript get current url hash 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
}