search

Home  >  Q&A  >  body text

javascript - BUG in loop mode of swiper plugin?

1. I now have 8 pieces of data, and then set it to switch 5 pieces of data every 5 seconds and set loop to true

Then~~just keep playing the last set of data, which is the second picture

Switch data every 5 seconds and always display the data of 6,7,8,1,2

Then I tried to pull back, but found that~~the previous data was empty

And~~when you drag the data, the content inside will change

Before dragging

After dragging (just move once)

Move again and miraculously it comes back

By the way, this is my version of swiper

Please help me how to solve these bugs (mainly solve the bug that keeps displaying 6,7,8,1,2 data)

大家讲道理大家讲道理2777 days ago938

reply all(1)I'll reply

  • 欧阳克

    欧阳克2017-06-26 11:00:10

    var mySwiper = new Swiper('.swiper-container',{

        autoplay: 5000,
        loop: true,
        prevButton:'.swiper-button-prev',
        nextButton:'.swiper-button-next'
    })
    setInterval("mySwiper.slideNext()", 5000);
    

    reply
    0
  • Cancelreply