-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
63 lines (60 loc) · 1.48 KB
/
script.js
File metadata and controls
63 lines (60 loc) · 1.48 KB
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
document.addEventListener('DOMContentLoaded', function () {
// Initialize Swiper
var swiper = new Swiper('.swiperMovie', {
speed: 400,
spaceBetween: 100,
autoplay: {
delay: 5000,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
breakpoints: {
// When window width is <= 767px
767: {
slidesPerView: 1,
spaceBetween: 10,
},
// When window width is <= 991px
991: {
slidesPerView: 2,
spaceBetween: 20,
},
// When window width is <= 1199px
1199: {
slidesPerView: 3,
spaceBetween: 30,
},
},
});
});
const indexSwiper = new Swiper(".indexSwiper", {
// Optional parameters
direction: "horizontal",
loop: true,
breakpoints: {
200: {
slidesPerView: 1.5,
spaceBetween: 10,
},
520: {
slidesPerView: 2.5,
spaceBetween: 15,
},
900: {
slidesPerView: 3.5,
spaceBetween: 20,
},
1350: {
slidesPerView: 4.5,
spaceBetween: 30,
},
},
});
const playButton = document.getElementById("playButton");
const videoFrame = document.getElementById("videoFrame");
playButton.addEventListener("click", function() {
// Toggle the 'none' class to show/hide the iframe
videoFrame.classList.toggle("none");
});