Created
April 21, 2016 07:42
-
-
Save r4fx/bd201a24dd9d2959a8cc5d4d97ed5458 to your computer and use it in GitHub Desktop.
Revert preventDefault
This file contains 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
function doPrevent(e) { | |
e.preventDefault(); | |
} | |
// Prevent events | |
$(window).on('scroll mousewheel DOMMouseScroll', doPrevent); | |
$(window).on('mousemove', function (e) { | |
// Revert | |
$(window).off('scroll mousewheel DOMMouseScroll', doPrevent); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment