Initial commit
This commit is contained in:
16
js/imageSwiper.js
Normal file
16
js/imageSwiper.js
Normal file
@@ -0,0 +1,16 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.querySelectorAll('[data-image-swiper]').forEach(function (container) {
|
||||
new Swiper(container.querySelector('.swiper'), {
|
||||
slidesPerView: 1,
|
||||
loop: true,
|
||||
navigation: {
|
||||
nextEl: container.querySelector('.swiper-button-next'),
|
||||
prevEl: container.querySelector('.swiper-button-prev'),
|
||||
},
|
||||
pagination: {
|
||||
el: container.querySelector('.swiper-pagination'),
|
||||
clickable: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user