Jump to content

Cross Browser mouseenter/mouseleave?


shadowayex
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...