I'm trying to get the hash value after a link was clicked. Any ideas?
e.g.
The Link
index.html#needThis
This is my result:
index.htmlneedThis
How can I remove the 'index.html' ?
$('#myselector').on('click', 'a', function(){
    var hash = $(this).attr('href').replace('#', '') //get url
    console.log(hash);
})
 
     
     
     
     
     
    