Answer the question
In order to leave comments, you need to log in
How to make the touchpad scroll event on a laptop work 1 time?
https://codepen.io/Concencuc/pen/rNmxPPm
Several values are displayed in the console if you scroll with the touchpad. And if you scroll with the mouse, then one value is displayed.
As a result of this, in my script, the slider will scroll several slides at once if you use the touchpad.
slider.on('scroll', (function(e) {
e.preventDefault();
if (e.deltaY < 0) {
$(this).stop().slick('slickPrev');
} else {
$(this).stop().slick('slickNext');
}
}));
Answer the question
In order to leave comments, you need to log in
Try to react not to the scroll. And for touch events
https://developer.mozilla.org/ru/docs/Web/API/Touc...
There is also such a library: https://hammerjs.github.io/
This is a similar question: Is there an API from the touchpad for the web?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question