Add autoplay for swipe slider using js

Add the following code to javascript
autoplay: { delay: 2000, }

 var swiper = new Swiper(".mySwiper", {
      slidesPerView: 5,
      spaceBetween: 10,
      slidesPerGroup: 5,
      loop: true,
      loopFillGroupWithBlank: false,
      pagination: {
        el: ".swiper-pagination",
        clickable: false,
      },
       autoplay: {
    delay: 2000,
  },
    });

Leave a comment

Your email address will not be published. Required fields are marked *