title: how to stop a hashtag's default click behaviour?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2852321/stop-default-hashtag-behavior-with-jquery">Stop default hashtag behavior with jquery</a>  </p>
  </blockquote>
  
  
  
  <p>I have some jquery code on a link that loads a DIV into the page using .load(), it also adds a hashtag to the url for pagination / bookmarking purposes; what i want to do is to stop the page from jumping to the div when the link is clicked.</p>
  
  <pre><code>$('#jqNav li a').click(function(){
  
      if($(this).parent().is(".nav1")){ $('.landing .main .nav ul').css({ "background-position" : "0 -50px" });} 
      else if($(this).parent().is(".nav2")) {    $('.landing .main .nav ul').css({ "background-position" : "0 -100px" });}
      else if($(this).parent().is(".nav3")) {    $('.landing .main .nav ul').css({ "background-position" : "0 -150px" });}
      else if($(this).parent().is(".nav4")) {    $('.landing .main .nav ul').css({ "background-position" : "0 -200px" });};
  
  
      stopAnim = true;
      $page = $(this).attr('href');
      var $hashTag = $(this).attr('name');
      window.location = "#" + $hashTag;
      loadData();
      e.preventdefault();
      return false;
  
  });
  </code></pre>