Last active
November 5, 2023 15:57
-
-
Save Efetivos/544fd80b4c36a45395ec5c4044992423 to your computer and use it in GitHub Desktop.
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
| ['wheel', 'DOMMouseScroll'].forEach(evt => | |
| window.addEventListener(evt, function (evt) { | |
| var dir = Math.sign(evt.deltaY); | |
| if (dir < 0) { | |
| console.log(dir) | |
| } | |
| else if (dir > 0) { | |
| console.log(dir) | |
| } | |
| }, false) | |
| ); | |
| /* -------------- MOUSE WHEEL---------------- */ | |
| $(window).bind('mousewheel DOMMouseScroll', function(event){ | |
| if (event.originalEvent.wheelDelta > 0 || event.originalEvent.detail < 0) { | |
| tlSlide.reverse() | |
| } | |
| else { | |
| tlSlide.play() | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment