title: jquery click on anchor element forces scroll to top?
body: <p><a href="https://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value[link">jQuery hyperlinks - href value?</a> text][1]</p>
  
  <p>I am running in to a problem using jquery and a click event attached to an anchor element. 
    [1]: <a href="https://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value">jQuery hyperlinks - href value?</a> "This" SO question seems to be a duplicate, and the accepted answer doesn't seem to solve the problem. Sorry if this is bad SO etiquette. </p>
  
  <p>In my .ready() function I have:</p>
  
  <pre><code>jQuery("#id_of_anchor").click(function(event) { //start function when any update link is clicked
          Function_that_does_ajax();
          });
  </code></pre>
  
  <p>and my anchor looks like this:</p>
  
  <pre><code>&lt;a href="#" id="id_of_anchor"&gt; link text &lt;/a&gt; 
  </code></pre>
  
  <p>but when the link is clicked, the ajax function is performed as desired, but the browser scrolls to the top of the page. not good.</p>
  
  <p>I've tried adding:</p>
  
  <pre><code>event.preventDefault(); 
  </code></pre>
  
  <p>before calling my function that does the ajax, but that doesn't help. 
  What am I missing?</p>
  
  <p>Clarification</p>
  
  <p>I've used every combination of </p>
  
  <pre><code>return false;
  event.preventDefault(); 
  event.stopPropagation();
  </code></pre>
  
  <p>before and after my call to my js ajax function. It still scrolls to the top.</p>