<div class="worksSlider swiper-slider">
<div class="swiper-wrapper">
<div class="swiper-slide">
Слайд 1
</div>
<div class="swiper-slide">
Слайд 2
</div>
</div>
</div>
window.onload = function() {
const swiper = new Swiper('.worksSlider', {
// Optional parameters
loop: true,
});
};