今天用jquery写hover事件,临时遇到个需求需要遇到特定条件能够取消hover事件,但是使用
$("a").unbind("hover");
起不到任何作用,最后在stackover上查到解决办法:
$("a").unbind('mouseenter mouseleave');
在jquery的官方文档上有这方面的说明: jQuery documentation
今天用jquery写hover事件,临时遇到个需求需要遇到特定条件能够取消hover事件,但是使用
$("a").unbind("hover");
起不到任何作用,最后在stackover上查到解决办法:
$("a").unbind('mouseenter mouseleave');
在jquery的官方文档上有这方面的说明: jQuery documentation