Skip to content

Instantly share code, notes, and snippets.

View sagive's full-sized avatar

Sagive SEO sagive

View GitHub Profile
@sagive
sagive / swiper-play-in-viewport.js
Last active July 2, 2022 21:37
Complete swiper example + run the swiper when it enters the viewport - treshold = "percent of element visible" -> 0.1 = 10%
// TESTIMONIALS SWIPER
const testimonySwiper = new Swiper(".testimonySwiper", {
loop: true,
slidesPerView: 1.3,
spaceBetween: 16,
centeredSlides: true,
initialSlide: 3,
autoplay: {
delay: 7500,
disableOnInteraction: true,