Created
March 17, 2011 14:49
-
-
Save avhm/874447 to your computer and use it in GitHub Desktop.
Override scroll action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mouseWheelHandler = function(e){ | |
// Prevent your scroll action here e.g: | |
$(window).stop(true) | |
} | |
/** for Mozilla. */ | |
if (window.addEventListener) window.addEventListener('DOMMouseScroll', mouseWheelHandler, false); | |
/** IE/Opera. */ | |
window.onmousewheel = document.onmousewheel = mouseWheelHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment