JavaScript
- 1 ответ
- 0 вопросов
1
Вклад в тег
var allSliders = document.querySelectorAll('.places__slider')
allSliders.forEach(function(oneSlider) {
var mySwiper = new Swiper(oneSlider, {
slidesPerView: 3,
// spaceBetween: 5,
loop: false,
init: false,
autoplay: {
delay: 1000,
},
breakpoints: {
320: {
slidesPerView: 6
},
500: {
slidesPerView: 7
},
992: {
slidesPerView: 6
},
1600: {
slidesPerView: 10
}
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
// делаем что угодно с нашим "mySwiper"
});