如何删除jQuery添加的$ .hover事件? [英] How to remove $.hover event added by jQuery?
本文介绍了如何删除jQuery添加的$ .hover事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试过 $。unbind('hover')
,这不起作用。
推荐答案
hover 功能只是一个 short-hand 将两个处理程序绑定到 mouseenter 和 mouseleave 事件,你应该解除绑定:
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');
这篇关于如何删除jQuery添加的$ .hover事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文