-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomePage.js
75 lines (55 loc) · 1.58 KB
/
HomePage.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
// Mobile Nav
const mobDropdown1=document.querySelector('.mob-dropdown1');
const mobDropdown2=document.querySelector('.mob-dropdown2');
const mobileNav=document.querySelector('.mobile-nav');
const menu=document.querySelector('#menu');
const close=document.querySelector('#close');
const body=document.querySelector("body");
let mobDropdown1Active = false; // Set to false initially
let mobDropdown2Active = false; // Set to false initially
function showMobDropdown1() {
if (mobDropdown1Active) {
mobDropdown1.style.display = 'none';
mobDropdown1Active = false;
} else {
mobDropdown1.style.display = 'block';
mobDropdown1Active = true;
}
}
function showMobDropdown2() {
if (mobDropdown2Active) {
mobDropdown2.style.display = 'none';
mobDropdown2Active = false;
} else {
mobDropdown2.style.display = 'block';
mobDropdown2Active = true;
}
}
function showMobileNav() {
mobileNav.style.display = 'block';
menu.style.display = 'none';
close.style.display = 'block';
}
function closeMobileNav() {
mobileNav.style.display = 'none';
close.style.display = 'none';
menu.style.display = 'block';
}
// ----------------------------------------------------------------------------
// Swipper
var swiper = new Swiper(".mySwiper", {
spaceBetween: 30,
centeredSlides: true,
autoplay: {
delay: 2500,
disableOnInteraction: true,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
});