For url that is also document’s location, use below code to find if #hash tag exist
if(window.location.hash) {
var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
if( hash){
//do something
}
}
To get the url parameters, simply use code like
if(window.location.hash) {
var param = "parameter name";
var checking = window.location.hash.split('param=')[1];
if( checking == 'checked' ){
//do something here
alert(param);
}
}
What do you think?