keep div visible when hover
Hello
$("p").hover(function(){
var pos = $("#p").offset();
$('#test').css({"top":(this.offsetHeight+pos.top)+"px","left":(pos.left),"width":this.offsetWidth});
$('#test').fadeIn("slow");
});
$("#test").mouseout(function(){
$('#test').fadeOut("slow");
});
HTML
<p id="p" style="top:100px; left:100px; position:absolute; ">Click or double click here.</p>
<div id="test" style="background-color:Green; display:none; position:absolute;">test div</div>
What i need is when i hover over to Paragrah the div should be displayed right below it. This much is working.
But i need to keep the div visible when cusor is over it and make it invisible again if cusor moves out of it. Like a drop down menu.
Vinod