Answer the question
In order to leave comments, you need to log in
How to simplify the initialization of five swiper sliders?
There is an initialization of the slider with breakpoints
var swiper = new Swiper('.clients', {
slidesPerView: 1,
spaceBetween: 10,
// init: false,
// If we need pagination
pagination: {
el: '.swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// And if we need scrollbar
scrollbar: {
//el: '.swiper-scrollbar',
},
breakpoints: {
640: {
slidesPerView: 2,
spaceBetween: 20,
},
768: {
slidesPerView: 4,
spaceBetween: 40,
},
1024: {
slidesPerView: 5,
spaceBetween: 50,
},
}
});
var swiper = new Swiper()
var swiper2 = new Swiper()
...
var swiperN = new Swiper()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question