Created
October 1, 2018 22:11
-
-
Save DevShahidul/751da09547af8c19a79cb32534b0f7ab to your computer and use it in GitHub Desktop.
See the example here >> https://stackoverflow.com/questions/34498929/check-mousewheel-event-direction-with-scroll-locked and here >> https://jsfiddle.net/adeneo/Lwp3c5br/
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
| $(document).on('DOMMouseScroll mousewheel', function(e) { | |
| var moved = e.originalEvent.wheelDelta || e.originalEvent.detail * -1 || 0; | |
| if (moved > 0) { | |
| // scrolled up | |
| } else if (moved < 0) { | |
| // scrolled down | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment