Check and Get for a #hash in a URL - http://stackoverflow.com/a/6682514/5627904
if(window.location.hash) {
var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
alert (hash);
// hash found
} else {
// No hash found
}