Created
May 14, 2017 11:37
-
-
Save severuykhin/4be048224c8f7b12bbad5e40f6461117 to your computer and use it in GitHub Desktop.
Scroll detection
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
$('element').bind('DOMMouseScroll mousewheel', function(e){ | |
event.preventDefault(); | |
if(e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) { | |
//Actions | |
} | |
else{ | |
//Actions | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment