Skip to content

[Help]: Is there a way to receive events or toggle classnames when a slide starts and completes its movement? #1093

Closed Answered by davidjerleke
asdf99245 asked this question in Help
Discussion options

You must be logged in to vote

@asdf99245 you can use the select event when the carousel selects a new target (starts animating), and use the snippet to in the following discussion to add a settle threshold:

Regarding this:

Additionally, I've observed that when moving with scrollTo outside of autoplay, it moves quickly and then autoplays again, causing the settle event not to occur.

This is expected. If you check the Autoplay example in the docs, you will see that you need to call the autoplay reset method when calling scrollTo to avoid this.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@davidjerleke
Comment options

Answer selected by davidjerleke
@asdf99245
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
resolved This issue is resolved question Question about how to achieve something
2 participants