Multiple sliders on page, get the specific instance in a Move event firing #1019
Unanswered
cheeseytoastie
asked this question in
Q&A
Replies: 1 comment
-
Will raise an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Requirement is to only show three pagination dots (next, prev and active) - so I want to add / remove custom classes to the pagination dots.
The main problem I'm having is creating code that captures the event move and then being able to "know" which Splide instance I'm in to do so something (add some custom classes).
I thought I could just loop through the instances, and if I pass the instance it will "operate" on the correct splide. It always seems to use the last one created.
I'm trying to capture both the create and move.
Here's a CodePen link: https://codepen.io/siempre_steve/pen/oNyyrMo
I suspect I'm doing something stupid in JS here. Any pointers much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions