title: How to prevent jump on an anchor click?
body: <p>I use <code>e.preventDefault();</code> to disable default anchor behaviour.</p>
  
  <p>Is there a way to prevent only jump action to a target on click?</p>
  
  <p>I tried:</p>
  
  <pre><code>  var hash = window.location.hash;
    var link = $('a');
    $('a').click(function() {
      e.preventDefault();
      hash = "#"+link.attr("href");
    });
  </code></pre>
  
  <p>But it doesn't work: <a href="http://jsfiddle.net/ynts/LgcmB/" rel="noreferrer">http://jsfiddle.net/ynts/LgcmB/</a>.</p>