I have a button that when hovered over (mouseover) displays a div right below it. When hovered away (mouseout), the div disappears.
This all works well and nicely, bu
Stick another div #wrapperDiv
around both the button and the #displayDiv
and attach hoverIntent to #wrapperDiv
rather than the button:
$('#wrapperDiv').hoverIntent(function () {
$("#displayDiv").stop().slideDown('slow');
},
function () {
// I don't want the div to hide if user hovers over it
$("#displayDiv").stop().slideUp('slow');
});
HTML:
<div id="wrapperDiv">
<div id="hoverMeToShowHideDiv"> // some stuff </div>
<div id="displayDiv">
// some other stuff that I want to
// keep showing if users hover over it
</div>
</div>