jQuery's mouseleave seems to trigger on any covering elements. I don't want these covering elements to be considered as "outside" my target area. Here's a simple example using the datepicker from jQueryUI:
$("#datepicker").datepicker({});
$(".wrapper")
.mouseenter(function(){
$("#status").html("Status: Mouse is INSIDE");
})
.mouseleave(function(){
$("#status").html("Status: Mouse is OUTSIDE");
});
Notice that the mouseleave is triggered when the mouse is over the datepicker. What's a good solution to prevent this for this datepicker example? And what's a good solution for any future elements I might add that cover the target?
.wrapper
element. Therefore any mouse activity on it will not be bubbled up to.wrapper
. A workaround would be to check the mouse co-ordinates against the known boundaries of the.wrapper
element, although this will be ugly. Someone else may know of a better solution. – Argumentative