Mouseover problem

爷,独闯天下 提交于 2019-12-02 07:39:07

You might want to use the mouseenter() event instead, as mouseover will fire upon every move inside the element.

$('.msg_id').live("mouseenter", function() {
    //Do work here
});

or if live isn't required, simply:

$('.msg_id').mouseenter(function() {
    //Do work here
});

MouseOver():

  • Will fire upon entering an element can fire inside of any child elements.

MouseEnter():

  • Will fire upon entering an element, and only that element.

You want to use mouseenter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!