get hashtag from the url #
if(window.location.hash) { console.log(window.location.hash); } else { // Fragment doesn't exist }