30 lines
496 B
JavaScript
30 lines
496 B
JavaScript
const swiper = new Swiper('.swiper', {
|
|
// Optional parameters
|
|
direction: 'horizontal',
|
|
loop: true,
|
|
|
|
// Navigation arrows
|
|
navigation: {
|
|
nextEl: '.swiper-button-next',
|
|
prevEl: '.swiper-button-prev',
|
|
},
|
|
|
|
// And if we need scrollbar
|
|
scrollbar: {
|
|
el: '.swiper-scrollbar',
|
|
},
|
|
|
|
speed: 1000,
|
|
breakpoints: {
|
|
740: {
|
|
slidesPerView: 1,
|
|
},
|
|
1200: {
|
|
slidesPerView: 2,
|
|
},
|
|
1600: {
|
|
slidesPerView: 3,
|
|
},
|
|
}
|
|
|
|
}); |