slideToLoop.js 292 B

12345678910
  1. export default function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) {
  2. const swiper = this;
  3. let newIndex = index;
  4. if (swiper.params.loop) {
  5. newIndex += swiper.loopedSlides;
  6. }
  7. return swiper.slideTo(newIndex, speed, runCallbacks, internal);
  8. }