今天用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