<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,
  });
};

External CSS

  1. https://unpkg.com/swiper@7/swiper-bundle.min.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/Swiper/7.4.1/swiper-bundle.min.js