title: Is there a way to override the browser's default behavior for clicking on hashes?
body: <p>When I have the following:</p>
  
  <pre><code>&lt;a name='test'&gt;&lt;/a&gt;
  </code></pre>
  
  <p>...and load it in a browser, I can append <code>#test</code> to the URL and the browser will scroll so that the <code>&lt;a&gt;</code> is at the top of the page.</p>
  
  <p><strong>However,</strong> I would like to change this behavior (using JavaScript if possible) so that using the hash <em>does not</em> scroll the page - I'd like it to simply do nothing.</p>
  
  <p>Is there a way to do that <em>without</em> removing the <code>&lt;a&gt;</code> element?</p>
  
  <hr>
  
  <p><strong>Update:</strong> I need the browser to still send <code>onhashchange()</code> events but without scrolling to the <code>&lt;a&gt;</code> element. The reason being that I want to override the scrolling while retaining the event notification.</p>