kenwheeler / slick

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

Determining a click on a partially-visible slide? #4057

Open 3chillies-kris opened 3 years ago

3chillies-kris commented 3 years ago

Hi guys, I thought I'd get in touch and ask the community if any of you have encountered this, and written a solution for it at all.

Using native Slick functionality, I have a 'card carousel' that only partially shows the last element (so of course, slidesToShow is 3.25). Each slide has a flat overlay link over the top of it, but I was hoping to provide something a little bit different for that card that's overlapping off to the side. If you click that one, it won't follow the link but instead will slide the carousel one over. Then click it once more, and it follows the link as normal. I've tried resolving this with Javascript, can't get it done (broadly because it's too complex for me) but I've realised I may be over-complicating the issue by not posing this scenario to you guys instead.

Is there anything by default available to work from in Slick that I've missed? If not, have you folks found/written something that handles this properly?

Would appreciate any and all potential help!