"javascript:void(0);" vs "return false" vs "preventDefault()"
<p><br>
When I want some link to not do anything but only respond to javascript actions what's the best way to avoid the link scrolling to the top edge of the page ?<br>
I know several ways of doing it, they all seem to work fine :</p>

<pre><code>&lt;a href="javascript:void(0)"&gt;Hello&lt;/a&gt;
</code></pre>

<p>or </p>

<pre><code>&lt;a id="hello" href="#"&gt;Hello&lt;/a&gt;
&lt;script type="text/javascript&gt;
  $(document).ready(function() {
    $("#toto").click(function(){
      //...
      return false;
    });
  });
&lt;/script&gt;
</code></pre>

<p>and even : </p>

<pre><code>&lt;a id="hello" href="#"&gt;Hello&lt;/a&gt;
&lt;script type="text/javascript&gt;
  $(document).ready(function() {
    $("#toto").click(function(event){
      event.preventDefault();          
      //...
    });
  });
&lt;/script&gt;
</code></pre>

<p>Do you have any preference ? why ? in which conditions ? </p>

<p>PS: of course the above examples assume you're using jquery but there's equivalents for mootools or prototype.</p>
