var mySwiper = new Swiper(".swiper-container", {
slidesPerView: 5,
spaceBetween: 20,
speed: 1000,
autoplay: {
delay: 800,
stopOnLastSlide: false,
disableOnInteraction: false,
},
loop: true,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
var windowW = $(window).width();
if (windowW <= 768) {
console.log("cccc")
mySwiper = new Swiper(".swiper-container", {
speed: 1000,
autoplay: {
delay: 800,
stopOnLastSlide: false,
disableOnInteraction: false,
},
loop: true,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
}
$(window).resize(function () {
myChart1.resize();
myChart2.resize();
var windowW = $(window).width();
if (windowW <= 768) {
console.log("aa")
mySwiper.destroy(false);
mySwiper = new Swiper(".swiper-container", {
speed: 1000,
autoplay: {
delay: 800,
stopOnLastSlide: false,
disableOnInteraction: false,
},
loop: true,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
}
else {
console.log("bb")
mySwiper.destroy(false);
mySwiper = new Swiper(".swiper-container", {
slidesPerView: 5,
spaceBetween: 20,
speed: 1000,
autoplay: {
delay: 800,
stopOnLastSlide: false,
disableOnInteraction: false,
},
loop: true,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
}
});