-
SummaryI use a plugin to handle classNames with loop mode. However, I have a problem to catch all slides with the slide before 'is-snapped' and the slides after 'is-snapped'. For example, the slides that are before should be with the class 'is-previous-slide' and the next ones 'is-next-slide'. Has anyone needed this solution before? If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox exampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @Filip1139, Thanks for your question. Please clarify what you want to achieve. Do you want to track the slides that were snapped one step before? Example:
If not, please try to share a visual demonstration or similar that would help to clarify what you want to achieve. |
Beta Was this translation helpful? Give feedback.
-
Ok, @davidjerleke I have prepared a small demo: https ://codesandbox.io/p/sandbox/embla-carousel-slides-to-scroll-vanilla-forked-wgjjk2? In this case, I would like to have the following:
I tried to do something with |
Beta Was this translation helpful? Give feedback.
I achieve what I need by using this code: