Last active
March 1, 2019 11:19
-
-
Save kisildev/1f139fd296dd7e7cfb55b418e3afe269 to your computer and use it in GitHub Desktop.
Slick-slider mousewheel
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
| var slickCarousel= $('.serviceSlider'); | |
| slickCarousel.slick({ | |
| slidesToShow: 1, | |
| slidesToScroll: 1, | |
| arrows: false, | |
| fade: true, | |
| autoplay: false, | |
| dots:true, | |
| infinite:false, | |
| adaptiveHeight: true, | |
| }); | |
| slickCarousel.mousewheel(function(e) { | |
| e.preventDefault(); | |
| if (e.deltaY < 0) { | |
| $(this).slick('slickNext'); | |
| } | |
| else { | |
| $(this).slick('slickPrev'); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment