You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple sliders with same selector and options on start. const Swipers = new Swiper('.slider-block', {})
I want to change options of some sliders and keep others unchanged without adding another new Swiper, so i decided to add data attribute.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have multiple sliders with same selector and options on start.
const Swipers = new Swiper('.slider-block', {})
I want to change options of some sliders and keep others unchanged without adding another new Swiper, so i decided to add data attribute.
First i tried merge swiper.params and data objects and use update() method. It works.
But i need to add different breakpoints and code up here doesn't work. Swiper updates only breakpoints and ignores other options.
How i tried to solve that for now, but unsuccessful
I had to split breakpoints and other options, merge breakpoints first and use update() twice:
So how actually change params by update()?
It's seems weird that update() can't change them in first code. Does that looks like a issue?
Full code:
Beta Was this translation helpful? Give feedback.
All reactions