I have a link that displays a div when hovered over. I already have code to show the it, but how can I hide it when the cursor leaves both the link and the div? Here is my HTML code:
<a href="javascript:void(0);" id="show_div">2 items</a>
<div id="dropcart">contents</div>
<script type="text/javascript">
$(document).ready(function(){
$("#show_div").hover(function(){
$("#dropcart").fadeIn();
});
});