Swiper Slider slideTo

1 reply · opened Apr 12, 2019

SsupergaeApr 12, 2019

Hi,

I'm using a onepage template with a Swiper slider in the header.
Is there the possibility to make the slider jump to a certain slide from a link in the page?
For example: if I click a specific link in the page, the slider will change from slide 1 to slide number 3.
Is it possible?

Thanks in advance,
Gaetana

SSemicolon WebSTAFFApr 14, 2019

Hello,

This functionality is currently not supported out the box. However, you can consider using the API from the Official Plugin Documentation: http://idangero.us/swiper/api/ .

Example:

var mySwiper = document.querySelector('.swiper-container').swiper;

and then use the mySwiper.slideTo(2); API method to Slide the Slider to the 3rd Slide.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard