-
Notifications
You must be signed in to change notification settings - Fork 0
/
swiper.js
103 lines (99 loc) · 1.9 KB
/
swiper.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
window.onload = () => {
new Swiper(".swiper", {
effect: "coverflow",
direction: "vertical",
grabCursor: true,
centeredSlides: true,
coverflowEffect: {
rotate: 0,
stretch: 0,
depth: 100,
modifier: 3,
slideShadows: true,
},
keyboard: {
enabled: true,
},
mousewheel: {
thresholdDelta: 70,
},
loop: true,
autoplay: {
delay: 3000,
disableOnInteraction: true,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
breakpoints: {
640: {
slidesPerView: 2,
},
768: {
slidesPerView: 1,
},
1024: {
slidesPerView: 2,
},
1560: {
slidesPerView: 3,
},
},
});
new Swiper(".swiper-h", {
effect: "coverflow",
grabCursor: true,
centeredSlides: true,
coverflowEffect: {
rotate: 0,
stretch: 0,
depth: 100,
modifier: 3,
slideShadows: true,
},
keyboard: {
enabled: true,
},
mousewheel: {
thresholdDelta: 70,
},
loop: true,
autoplay: {
delay: 3000,
disableOnInteraction: true,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
breakpoints: {
640: {
slidesPerView: 2,
},
768: {
slidesPerView: 1,
},
1024: {
slidesPerView: 2,
},
1560: {
slidesPerView: 3,
},
},
});
const job1 = document.querySelector(".job1");
const job2 = document.querySelector(".job2");
for(var i = 1; i < 10; i++) {
const d = document.createElement("div");
d.className = "swiper-slide";
const e = document.createElement("img");
e.src = `/assets/shakeTheme/${i}.png`;
d.appendChild(e)
if(i > 5) {
job2.appendChild(d);
} else {
job1.appendChild(d);
}
}
}