On the page :
mySwiper.slideTo(index, speed, runCallbacks);
Start the transition to the slide with the index number equal to the 'index' parameter for the speed equal to the "speed" parameter. You can set "runCallbacks" to false (the default is "true"), and the transition will not call the onSlideChange callback functions.
So, in your case, you first need to declare a variable, for example:
var mySwiper = new Swiper('.swiper-container',{ mode:'horizontal', loop: false });
And then:
$('.slide-3').click(function(e) { e.preventDefault(); $(".menu .active").removeClass('active'); $(this).addClass('active'); mySwiper.slideTo( $('.pag2').index(),1000,false ); });
source share