title: Stop propagation of click event on href
body: <p>How can I stop the propagation of the click event so that the browser will NOT redirect?</p>
  <pre><code>&lt;a id=&quot;theHref&quot; href=&quot;http://stackoverflow.com/&quot;&gt;SO&lt;/a&gt;
  &lt;script&gt;
      document.getElementById(&quot;theHref&quot;).addEventListener(&quot;mousedown&quot;, function(event) {
          console.log(&quot;href clicked, lets try to stop event propagation&quot;);
          event.stopPropagation();
          event.preventDefault();
          return false;
      });
  &lt;/script&gt;
  </code></pre>