How to remove $.hover event added by jQuery?

前端 未结 4 1864
萌比男神i
萌比男神i 2020-12-14 05:37

I tried $.unbind(\'hover\'), which is not working.

4条回答
  •  被撕碎了的回忆
    2020-12-14 06:17

    The hover function it's just a short-hand to bind two handlers to the mouseenter and mouseleave events, you should unbind them:

    $('#item').unbind('mouseenter mouseleave');
    

提交回复
热议问题