2017-02-15 4 views
0

는 내가 mousewheel.js의 jQuery 플러그인 I 일시적으로 '마우스 휠'이벤트를 비활성화 할 수있는 방법 https://github.com/jquery/jquery-mousewheelmousewheel.js를 사용하여 일시적으로 '마우스 휠'이벤트를 비활성화하는 방법은 무엇입니까?

을 사용하고 있습니다?

또는 언 바인딩하고 잠시 후 바인딩 할 수 있습니까?

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

}); 

고마워요!

+0

여기에 매우 비슷한 질문 : http://stackoverflow.com/questions/6702116/jquery-mousewheel-how-to-disable – DeclanPossnett

+0

'$ (창). 오프 ('마우스 휠')'? [jquery에서 이벤트 연결 끊기] (https://learn.jquery.com/events/handling-events/#disconnecting-events) – barbsan

+0

다음은 바이올린입니다. https://jsfiddle.net/bfdyxobn/11/ 뭔가 바보 같지만 클릭 이벤트에서 .off()를 사용한 후에도 여전히 트리거됩니다. 감사! –

답변

0

는 바인딩하려면 :

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

이 바인딩을 해제하려면

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