I have an unordered list with mouseover and mouseout events attached to the li elements. Each contains a link and there is a bit of padding in the li. When I mouseover the l
Use "event.stopPropagation()" to stop the events from bubbling upwards:
jQuery('#menu li a').mouseover( function(evt) {
evt.stopPropagation();
return false;
});
jQuery('#menu li a').mouseout( function(evt) {
evt.stopPropagation();
return false;
});
Alternatively use the mouseenter and mouseleave events instead of mouseover/out. jQuery normalizes their behaviour across browsers and these events have the benefit of not bubbling...