且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由子元素触发的鼠标悬停事件 - 如何阻止它?

更新时间:2023-10-29 19:57:46

您是否尝试使用mouseenter和mouseleave而不是mouseover和mouseout?即使使用子元素,它们也只会触发一次,并且自1.6.1开始,Prototype 支持它。

Did you try to use "mouseenter" and "mouseleave" instead of "mouseover" and "mouseout"? They will only trigger once even with child elements, and Prototype supports it since 1.6.1.