-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (32 loc) · 1.17 KB
/
Copy pathscript.js
File metadata and controls
33 lines (32 loc) · 1.17 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
const hamburger = document.querySelector('#Hamburger');
const naviHeader = document.getElementById('nav-link');
const logImage = document.getElementById('log-image');
const cancel = document.getElementById('close');
const mainhead = document.getElementById('mheader');
const home = document.getElementById('home');
const about = document.getElementById('about');
const contact = document.getElementById('contact');
hamburger.addEventListener('click', () => {
naviHeader.classList.toggle('open');
logImage.classList.toggle('close');
cancel.classList.toggle('show');
mainhead.classList.toggle('wrap');
});
home.addEventListener('click', () => {
naviHeader.classList.remove('open');
logImage.classList.remove('close');
cancel.classList.remove('show');
mainhead.classList.remove('wrap');
});
about.addEventListener('click', () => {
naviHeader.classList.remove('open');
logImage.classList.remove('close');
cancel.classList.remove('show');
mainhead.classList.remove('wrap');
});
contact.addEventListener('click', () => {
naviHeader.classList.remove('open');
logImage.classList.remove('close');
cancel.classList.remove('show');
mainhead.classList.remove('wrap');
});