There are multiple ways to deal with this, but the one I prefer is after the animation of the initial mouseover completes you check to see if the mouse is still over that item. If it is not you close it back down.
jQuery doesn't have a built in check for mouse still over an object that I am aware of, but I wrote one of my own for the situation that is pretty simple.
var mouse = {
mouseX: null,
mouseY: null,
mouseInWindow: true,
init: function() {
$(document).bind('mousemove', function(event) {
mouse.mouseX = event.pageX;
mouse.mouseY = event.pageY;
mouse.mouseInWindow = true;
});
$(document).bind("mouseleave", function(event) {
mouse.mouseInWindow = false;
});
$(document).bind("mouseenter", function(event) {
mouse.mouseInWindow = true;
});
},
isOver: function($element) {
$elementPosition = $($element).offset();
$elementWidth = $($element).width();
$elementHeight = $($element).height();
$returnValue = true;
if (mouse.mouseX !== null) {
if (mouse.mouseX < $elementPosition.left) { $returnValue = false; }
if (mouse.mouseY < $elementPosition.top) { $returnValue = false; }
if (mouse.mouseX > $elementPosition.left + $elementWidth) { $returnValue = false; }
if (mouse.mouseY > $elementPosition.top + $elementHeight) { $returnValue = false; }
if (!mouse.mouseInWindow) { $returnValue = false; }
}
return $returnValue;
}
}
You will need to run mouse.init() before your other code, but then you can use mouse.isOver($(yourSlideActivator));