Created
July 28, 2017 15:06
-
-
Save solid-pixel/8d6ae21bac645f9fdf880f57e08db10a to your computer and use it in GitHub Desktop.
Detect ScrollWheel direction with jQuery
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
$('.article-body').on('wheel', function(e) { | |
var delta = e.originalEvent.deltaY; | |
if (delta > 0) | |
alert('down'); | |
else | |
alert('up'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment