I have created a simple functionality using jquery to show and hide a div on hover of an anchor. But, as soon as I leave the anchor tag, the div disappears. I'm unable to go through the div. I should be able to stay on the div element. please can any one help on this.
Here is the fiddle
<style>
.container {
width: 200px;
position: relative;
display: inline-block;
}
.dropdown{
position:absolute;
left:0px;
width:250px;
top:18px;
background-color:#c03;
height:100px;
display:none;
}
</style>
<script>
$(document).ready(function(){
$(".menuItem").hover(function(){
$(".dropdown").show();
}, function(){
$(".dropdown").hide();
});
});
</script>
<div class="container">
<div class="wrap">
<a href="#" class="menuItem">Menu Item</a>
<div class="dropdown">
asasasasa
</div>
</div>
</div>