swiper

Open full view…

appendSlide & prependSlide move swiper to newly created slide

pippoapps
Sun, 24 Dec 2017 11:44:40 GMT

I am creating a swiper with a lot of slides, which creates a long pause. Therefore, I only render selected slide, then prepend and append further slides. Whenever I prepend or append a slide, swiper moves to the last created slide. Is there a way to keep it still while adding slides?

pippoapps
Sun, 24 Dec 2017 11:52:02 GMT

I have tried several options, also _swiper.allowSlideNext = false; _swiper.allowSlidePrev = false; But still it slides to last created slide.

pippoapps
Sun, 24 Dec 2017 15:06:59 GMT

I resorted to use an overlay "preparing gallery", adding 150 items to swiper (about 8 seconds on IE and on a not-so-new android device, but I know JS performance sucks), then slide again to the slide I am interested to, and fade out the overlay.