Skip to content

Instantly share code, notes, and snippets.

@alt-karate
Created June 17, 2021 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alt-karate/4761c6bf2c0dc5dea42bfbc790c9f989 to your computer and use it in GitHub Desktop.
Save alt-karate/4761c6bf2c0dc5dea42bfbc790c9f989 to your computer and use it in GitHub Desktop.
$(function () {
var swiperSlide = $(this).find('.top_pickup_list_item');
var loopflag = false;
if (swiperSlide.length >= 4) {
loopflag = true;
}
var swiper = new Swiper('.swiper-container', {
spaceBetween: 30,
breakpoints: {
768: {
slidesPerView: 3,
}
},
loop: loopflag,
autoplay: {
delay: 4000,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment