How to stop link button refreshing the page
<p>In my code I'm using a link button called <code>updateLogButton</code> which shows/hides a div. Because I use a link button everytime its clicked focus is moved to the beginning of the page. How can I stop this default behaviour?</p>

<p>Jquery snippet:</p>

<pre><code>$('#updateLogText').hide();

$('#updateLogButton').click(function() {

    if ($('#updateLogText').is(':visible')){

        //hide div if content is visible
        $('#updateLogText').fadeOut();

    }else{

        $('#updateLogText').fadeIn();       
    }

});
</code></pre>

<p>HTML code:</p>

<pre><code>&lt;tr&gt;
    &lt;td&gt;&lt;a href="#"  id="updateLogButton"&gt;Update Log&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td colspan="3" &gt;
        &lt;div id="updateLogText" style="width:100%;"&gt;
            &lt;?php echo $data['updates']; ?&gt;
        &lt;/div&gt;

    &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p><strong>EDIT:</strong>
example of what i mean: <a href="http://jsfiddle.net/cF4Bb/7/" rel="nofollow">http://jsfiddle.net/cF4Bb/7/</a></p>
