Showing and hiding a div with jQuery
<p>When you click on the link, it with display the div "somecontent". And if you click on the link again, it will hide. How can I make the div show when hovering over the link and hide when moving away instead of showing and hiding on click?</p>

<p>Here is the code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
  $(".showcontent").click(function(){
    $(".somecontent").toggle("fast");
  });
});
&lt;/script&gt;

&lt;a class="showcontent" href=""&gt;Show&lt;/a&gt;
&lt;div class="somecontent"&gt;
   &lt;p&gt;some content&lt;/p&gt;
&lt;/div&gt;
</code></pre>
