Como verificar se a URL tem hash no reagir
if(window.location.hash) {
// Fragment exists
} else {
// Fragment doesn't exist
}
Thankful Tortoise
if(window.location.hash) {
// Fragment exists
} else {
// Fragment doesn't exist
}