override animation speed when moving to specific slide #458
Replies: 5 comments
-
I'm confused but why you don't want to update options? splide.options = { speed: 0 };
splide.go( 10 );
splide.options = { speed: 400 }; // restore |
Beta Was this translation helpful? Give feedback.
-
I have that exactly same line of codes but would love to have extra control in using go() and from 3 lines i can make the same thing with just one line |
Beta Was this translation helpful? Give feedback.
-
Okay, I can understand what you say, but I will not and should not add such an extra control because:
You can always create your own wrapper function to achieve that, or extends the Splide class itself, if necessary 🙂 |
Beta Was this translation helpful? Give feedback.
-
Totally understand your concern, by the way thanks for a great slider. I love it! 🤩 |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
In my case, i have a combination of multiple sliders synced together and the ui looks very similar to a table with main subject on first column of the table and contents are on the rest of the columns.
the first column is a vertical slider and the rest of columns are horizontal sliders wrapped within a vertical slider which is synced with the first one, so basically i have 2 vertical sliders synced together.
my concern is when i want to
secondSlider.go(index)
how can i disable speed option without updating the option likesecondSlider.options = {speed: 0}
?for example, my current index is at 0 and i want to jump down to index 10, the animation makes my eyes itchy.
maybe adding extra options like
secondSlider.go(10, {speed: 0})
for example to override speed option being set earlier?it would be great if i can pass an option in
go()
function with additional animation speed without changing optionsBeta Was this translation helpful? Give feedback.
All reactions