使用mousewheel.js,如何禁用鼠标滚轮'事件暂时?

时间:2017-02-15 12:51:06

标签: javascript jquery mousewheel

我正在使用mousewheel.js jquery插件 https://github.com/jquery/jquery-mousewheel

如何禁用'鼠标滚轮'事件暂时?

或者我怎样才能解除绑定并在一段时间后将其绑定?

$(window).on('mousewheel', function(event) {

});

谢谢!

1 个答案:

答案 0 :(得分:0)

要绑定:

$(window).bind("mousewheel", function(e){ return false;});

取消绑定:

$(window).unbind("mousewheel", function(e){ return false;});
相关问题