This is a (multiple allowed):
https://jsfiddle.net/5z4x9jt5/
Trying to figure out intended method to "slideTo" a specific slide index with loop: true
There should be a reasonable way to "slideTo" a slide index whose swiper has loop: true
Difficult to slideTo a specific slideTo without inspecting the DOM to know how many slides were added as a result of loop: true. Alternatively, I guess you could force loopAdditionalSlides to a defined number, but that should not be a requirement to be able to use slideTo with realIndex
I realize there was previously #2135 filed, but I really hope you reconsider this issue, as it should not require specific setup just to be able to do something as basic as "slideTo" a slide
Awesome. Would it be best to just build this into the slideTo method using if swiped.loop === true so as to not pollute with additional methods?
Thanks
No, because it will be impossible to slide by actual index
Any updates on this? slideToLoop is not working in version 4.3.3. :(
Is it possible somehow to use slideTo in combination with loop: true?
Thanks!
@nolimits4web Ok, so you wrote this in #2135 :
In loop mode there are duplicated HTML elements of slides. You need to consider it when doing slideTo with enabled loop mode
Which is a complete degeneracy. When I call Swiper.slideTo(2), I do not need to consider anything, I expect the component to show me 2nd slide. All the internal workings of the component, such as cloning and CSS transforms etc. should never be my concern. Check bxSlider, for example, they are also using cloned elements for infinite loop and bxSlider.goToSlide() works properly, as it should. Your idea that I should consider cloned elements is just plain stupid.