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
The project has multiple swiper sliders on a different sections. The slides are triggered to start only when it comes in the viewport. To do that I have used javascript observer.
So, the issue is happening on the sliders of sections 5 and 6. swiper.setProgress(progress, speed) method to reset transition from 1st slide. It works on the section 5 slider but does not apply to the section 6 slider.
If I remove swiper5.setProgress(progress,speed). Section 6 slider will start when comes in viewport other wise it doesn't.
I have named each slider differently, such as .mySwiper5 and .mySwiper6 respective to section 5 and 6.
I think the script is conflicting with each other. What can be done to resolve it?
This discussion was converted from issue #5065 on October 07, 2021 10:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The project has multiple swiper sliders on a different sections. The slides are triggered to start only when it comes in the viewport. To do that I have used javascript observer.
So, the issue is happening on the sliders of sections 5 and 6. swiper.setProgress(progress, speed) method to reset transition from 1st slide. It works on the section 5 slider but does not apply to the section 6 slider.
If I remove
swiper5.setProgress(progress,speed)
. Section 6 slider will start when comes in viewport other wise it doesn't.I have named each slider differently, such as
.mySwiper5
and.mySwiper6
respective to section 5 and 6.I think the script is conflicting with each other. What can be done to resolve it?
Project link : https://project-instock.netlify.app/
Here is a javascript observer code:
Beta Was this translation helpful? Give feedback.
All reactions