I have a menu-like drop down container that hides via binding the \"mouseleave\" event.
Thanks eyelidlessness! I actually found another answer to this problem last night that is very similar to what you posted.
.bind("mouseleave", function(e) { // ANSWER HERE!!!
if (!e.fromElement.length) {
_state.filterTrigger.data("open", false);
setTimeout(function() { _toggleFilter(_state.filterTrigger); }, 2000);
}
});
The e.fromElement object gives the count of OPTION objects in the SELECT. This object is undefined for other HTML tags. I haven't tried your solution but this works for me as well.