JQuery Mousewheel:如何禁用?
我使用jquery.mousewheel.js作为jQuery jScrollPane插件的一部分。
我想在某些时候禁用鼠标滚轮。
有人可以推荐一个可以做到的jQuery语句吗?
谢谢!
像这样的东西:
$("#menu").bind("mousewheel", function() { return false; });
尝试使用.unmousewheel()
,它也应该工作。
你必须解除绑定的容器是jspPane
在我的情况下,我只需要在#myOuterContainer
内的框中禁用它
$('#myOuterContainer .jspPane').bind('mousewheel',function(){ return false; });