-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
43 lines (41 loc) · 824 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var swiper = new Swiper(".mySwiper", {
slidesPerView: 3,
spaceBetween: 30,
slidesPerGroup: 1,
loop: true,
centeredSlides: true,
loopFillGroupWithBlank: true,
breakpoints: {
300: {
slidesPerView: 1,
},
640: {
slidesPerView: 2,
spaceBetween: 20,
},
768: {
slidesPerView: 3,
spaceBetween: 40,
},
1024: {
slidesPerView: 3,
spaceBetween: 50,
},
},
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});
window.addEventListener("scroll", function () {
var nav = document.querySelector("nav");
nav.classList.toggle("gantiwarna", window.scrollY > 0);
});