title: Why do <a href=#A> and jquery click function not work together?
body: <p>What I want is that: There is a link on top of page. When it is clicked, it should go to   in the same page and toggle a div class with jquery.But both of are not working at the same time.. For example:</p>
  
  <pre><code>&lt;a href='#A' id='link'&gt;Go to A and toggle a div class&lt;/a&gt;
  </code></pre>
  
  <p>jquery codes are:</p>
  
  <pre><code>$('#link').click(function () {
      $('.toggle').toggle();
     });
  
     &lt;a name='A'&gt; Here is A &lt;/a&gt;
  </code></pre>
  
  <p>my codes are more complex than that but same logic with I write here. When I click the link, the div which has toggle class toggles. First it looks jquery codes. But it does not go to #A. That is to say, href attribute is not working. Any idea?...</p>