I have an icon on my page which after a 500ms delay pops up a connecting box with further details.
Then when you mouseout from both the icon and the popup, after a 500ms delay the popup is hidden.
The trouble I am having is trying to prevent the hide from happening is the cursor re-enters the icon/popup during that 500ms delay.
Here's the code...
<div id="accountIcon">
<div id="accountPopup"></div>
</div>
CSS:
#accountIcon {
position:relative;
height:58px;
width:80px;
cursor:pointer;
background-color:#000;
}
#accountPopup {
position:absolute;
top:58px;
width:400px;
height:200px;
background-color:#CCC;
display:none;
}
jQuery:
$("#accountIcon").hover(function () {
$("#accountPopup").delay(500).show(0);
}, function () {
$("#accountPopup").delay(500).hide(0);
});