What's the best way to implement scroll with slick.js so that when you scroll with your mouse, it switches to the next slide? Or is there a setting I am missing?
Here is what I'm referring to, just in case. http://kenwheeler.github.io/slick/
Mouse scroll wheel jumps can usually be solved by basic troubleshooting techniques like rebooting the computer, cleaning the mouse components, replacing or recharging the mouse batteries, or checking the wireless connection or USB port. The issue can also be resolved by updating corrupt or outdated drivers.
You can also link to another Pen here (use the . css URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Slick is a fresh new jQuery plugin for creating fully customizable, responsive and mobile friendly carousels/sliders that work with any html elements.
I little modified previous answer for Mac. Because there scroll triggering multiple times.
var slider = $(".slider-item");
var scrollCount = null;
var scroll= null;
slider
.slick({
dots: true
});
slider.on('wheel', (function(e) {
e.preventDefault();
clearTimeout(scroll);
scroll = setTimeout(function(){scrollCount=0;}, 200);
if(scrollCount) return 0;
scrollCount=1;
if (e.originalEvent.deltaY < 0) {
$(this).slick('slickNext');
} else {
$(this).slick('slickPrev');
}
}));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With