Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Oct 18, 2023
1 parent 5080d95 commit e2760e6
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions playground/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
</head>

<body>
<button class="start">Start</button>
<button class="stop">Stop</button>
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
Expand All @@ -19,6 +21,7 @@
<div class="swiper-slide">Slide 7</div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-scrollbar"></div>
</div>

<style>
Expand Down Expand Up @@ -74,17 +77,35 @@
window.swiper = new Swiper(".swiper", {
spaceBetween: 20,
slidesPerView: 2,
slidesPerGroup: 2,
// centeredSlides: true,
loop: true,
createElements: true,
// freeMode: true,
speed: 3000,
autoplay: {
pauseOnMouseEnter: true,
delay: 2500,
enabled: true,
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
scrollbar: {
el: '.swiper-scrollbar',
},
navigation: true,
on: {
autoplayTimeLeft(s, time, progress) {
}
}
});

document.querySelector('.start').addEventListener('click', () => {
swiper.autoplay.start();
})
document.querySelector('.stop').addEventListener('click', () => {
swiper.autoplay.stop();
})


</script>
</body>
Expand Down

0 comments on commit e2760e6

Please sign in to comment.