Created
December 29, 2014 06:49
-
-
Save xincici/b9c5be780bc0e9e44f26 to your computer and use it in GitHub Desktop.
differences between mouseover and mouseenter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mouseenter事件在鼠标进入某个元素,或第一次进入这个元素的某个子元素时触发。一旦触发后,在mouseleave之前,鼠标在这个元素的子元素上触发mouseenter事件都不会触发这个元素的mouseenter事件。即:一旦进入,在子元素间的mouseenter不算是在本元素上的mouseenter。 | |
而mouseover事件是必然冒泡的,一旦子元素mouseover了,本元素必然mouseover(除非子元素上禁止冒泡了)。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment