Jump to content

Cross Browser mouseenter/mouseleave?


shadowayex

Recommended Posts

Is there a cross browser way to stop the bubbling of mouseover/mouseout? I've Googled and most of the solutions I found were old, and I was hoping for something simpler than what the writers of those solutions have done.Better yet, someone make the W3C add mouseenter/mouseleave to the recommendation. They are useful events, even if they came from Internet Explorer.

Link to comment
Share on other sites

Is there a cross browser way to stop the bubbling of mouseover/mouseout? I've Googled and most of the solutions I found were old, and I was hoping for something simpler than what the writers of those solutions have done.Better yet, someone make the W3C add mouseenter/mouseleave to the recommendation. They are useful events, even if they came from Internet Explorer.
function stopEvent(event){ var event = event ? event : window.event; if(typeof event.stopPropagation != 'undefined'){ event.stopPropagation(); }else{ event.cancelBubble = true; } }
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...