-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (25 loc) · 841 Bytes
/
index.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
let drive = document
.querySelector("#resume-button-2")
.addEventListener("click", openDrive);
let drive1 = document
.querySelector("#resume-button-1")
.addEventListener("click", openDrive);
function openDrive() {
window.open(
(href =
"https://drive.google.com/file/d/1pmCQ6PdU0i3kf-6fYFeCxWvNdCI0JIjD/view?usp=sharing")
);
}
const hamburger = document.querySelector(".hamburger");
const navMenu = document.querySelector(".nav-menu");
hamburger.addEventListener("click", mobileMenu);
function mobileMenu() {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
}
const navLink = document.querySelectorAll(".nav-link");
navLink.forEach((n) => n.addEventListener("click", closeMenu));
function closeMenu() {
hamburger.classList.remove("active");
navMenu.classList.remove("active");
}