-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
39 lines (31 loc) · 859 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
// Hamburger Toggler
const hamburger = document.querySelector(".hamburger");
const close = document.querySelector(".close");
const navUL = document.querySelector(".nav-ul");
hamburger.addEventListener("click", () => {
navUL.classList.toggle("show");
hamburger.classList.toggle("hide");
});
close.addEventListener("click", () => {
navUL.classList.toggle("show");
hamburger.classList.toggle("hide");
});
// Modal Secion
// VARIABLES
const btn = document.querySelector(".search");
const closeModal = document.querySelector(".close-modal");
btn.addEventListener("click", openPopup);
closeModal.addEventListener("click", closePopup);
// open popup
function openPopup(e) {
e.preventDefault();
modal.style.display = "block";
}
// close popup
function closePopup() {
modal.style.display = "none";
}
// Animation
AOS.init({
duration: 1000,
});