Prevent jquery show/hide div to goto top of page
<p>The following script works for me to show a certain div when clicking a link and hiding any other that might be shown (so that only one is shown at a time). But the script also goes to top when clicking a link. How can I aboid that.</p>

<p>Code:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){

$('a').click(function () {
var divname= this.name;
$("#"+divname).show("slow").siblings().hide("slow");
});

});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;


&lt;ul&gt;
&lt;li&gt;&lt;a href="#" name="div1" &gt;Show div1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" name="div2" &gt;Show div2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" name="div3" &gt;Show div3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" name="div4" &gt;Show div4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div&gt;

&lt;div id="div1" style="display:none"&gt;
This is div1
&lt;/div&gt;

&lt;div id="div2" style="display:none"&gt;
This is div2
&lt;/div&gt;

&lt;div id="div3" style="display:none"&gt;
This is div3
&lt;/div&gt;

&lt;div id="div4" style="display:none"&gt;
This is div4
&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt; 
</code></pre>
