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