Forum Moderators: open
$('.menu ul li a').mouseout(function(){
$('.menu ul li ul').hide();
return false;
});
$('*').hover(function(){
//alert($(this).get(0).tagName);
if (
($(this).get(0).tagName != "A") &&
($(this).get(0).tagName != "UL") **
($(this).get(0).tagName != "LI")
) {
$('.menu ul li ul').fadeOut('slow');
}
return false;
});
This event type can cause many headaches due to event bubbling. For instance, when the mouse pointer moves out of the Inner element in this example, a mouseout event will be sent to that, then trickle up to Outer. This can trigger the bound mouseout handler at inopportune times. See the discussion for .mouseleave() [api.jquery.com] for a useful alternative.