@Minusator

Как отключить autoplay в swiper для мобильных устройств?

Приветствую!
Как отключить autoplay в breakpoints 640?

const swiper2 = new Swiper(".teamSwiper", {
    loop: true,
    slidesPerView: 3,
    spaceBetween: 10,
    autoplay: {
        delay: 3500,
    },
    allowTouchMove: false,
    noSwiping: false,
    direction: "vertical",
    breakpoints: {
        640: {
            slidesPerView: 3,
            spaceBetween: 10,
            allowTouchMove: false,
            
        },
        768: {
            slidesPerView: 2,
            spaceBetween: 10,
        },
        1024: {
            slidesPerView: 2,
            spaceBetween: 10,
        },
    },
    pagination: {
        el: ".swiper-pagination",
        clickable: true,
    },
    navigation: {
        nextEl: '.swiper-button-next-team',
        prevEl: '.swiper-button-prev-team',
    },
});

Спасибо за помощь
  • Вопрос задан
  • 444 просмотра
Решения вопроса 1
@Minusator Автор вопроса
const swiper2 = new Swiper(".teamSwiper", {
loop: true,
slidesPerView: 3,
spaceBetween: 10,
autoplay: false,
allowTouchMove: false,
noSwiping: false,
direction: "vertical",
breakpoints: {
640: {
slidesPerView: 3,
spaceBetween: 10,
allowTouchMove: false,
autoplay:false
},
768: {
slidesPerView: 2,
spaceBetween: 10,
},
1024: {
slidesPerView: 2,
spaceBetween: 10,
allowTouchMove: true,
autoplay: {
delay: 3500,
},
},
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next-team',
prevEl: '.swiper-button-prev-team',
},
});
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы