Подскажите, что не так с breakpoints, на мобиле большой слайдер начинает бешено дергаться
window.addEventListener("load", function() {
const tabs = [...document.querySelectorAll(".tab-body")];
for (const tab of tabs) {
tab.classList.add("active");
const divs = [...tab.querySelectorAll(".swiper")];
const swiper = new Swiper(divs[1], {
spaceBetween: 10,
slidesPerView: 4,
freeMode: true,
breakpoints: {
320: {
slidesPerView: 2,
spaceBetween: 4,
},
640: {
slidesPerView: 3,
spaceBetween: 10,
},
1024: {
slidesPerView: 4,
spaceBetween: 10,
}
},
watchSlidesProgress: true,
});
new Swiper(divs[0], {
spaceBetween: 10,
slidesPerView: 1,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
},
thumbs: {
swiper: swiper
}
});
tab.classList.remove("active");
}
tabs[0].classList.add("active");
})