kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.33k stars 5.88k forks source link

MAC scrolling issue #4187

Open SZAJ opened 2 years ago

SZAJ commented 2 years ago

var wheel, scrolling; var $carousel = $('#carousel'); $carousel.on('init', () => { wheel = new WheelIndicator({ elem: $carousel[0], callback: wheelHandler, }); }) .on('beforeChange', () => { scrolling = true; }) .on('afterChange', () => { scrolling = false; }) .slick({ /// options... )}; function wheelHandler(e) { if (!scrolling) { console.log('Mouse wheel scroll:', e.direction); $carousel.slick(e.direction === 'up' ? 'slickPrev' : 'slickNext'); } }

Hello Guys. I finally found some help on this. I am stuck in the same problem. The code is working fine but on mac trackpad it is scrolling several at once and I don't know how to put the above solution in this code. Can you guys help me out please. This is the web url : https://mendhro.com/product/mens-faux-motorcycle-soa-tv-series-biker

``