1

It seems that the mouseout callback from jQuery attached to the div tag containing several children elements will be called each time when user dragged a mouse away from any of these children elements. Am I right?

If so, how can I intercept the top-level tag mouse event only?

FrozenHeart
  • 19,844
  • 33
  • 126
  • 242
  • 1
    Use [mouseleave](https://api.jquery.com/mouseleave/) **↬** http://stackoverflow.com/questions/4258615/what-is-the-difference-between-jquerys-mouseout-and-mouseleave – A. Wolff Feb 10 '16 at 12:19

1 Answers1

1

jQuery's mouseout bubbles, which means you can put an if statement to check and see if the target is the parent and put your code inside that.

https://jsfiddle.net/ck0kbowt/ for example :)

Xarus
  • 6,589
  • 4
  • 15
  • 22