Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active slide event #266

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

v-matheusb
Copy link

Added the glider-slide-active event to solve an issue where I discovered when making this type of slider:

WhatsApp Image 2024-08-22 at 14 54 10

It's composed of 2 sliders and I sync them by updating the current slider index during the glider-slide-visible event. I needed the centered slide to be active and adjacent ones to show partially, but I found that in some screen sizes, the event was triggering for one of the adjacent slides, which made it skip one slide in some cases, as well as sometimes causing glider-slide-visible to trigger multiple times while scrolling to a slide.

My solution was to create the glider-slide-active and made sure that it would only trigger once per slide scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant