-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
39 lines (37 loc) · 1.3 KB
/
app.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
const hamburger = document.querySelector('.hamburger');
const closeBtn = document.querySelector('.close_btn');
const ul = document.querySelector('ul');
const logo = document.querySelector('.logo');
const main = document.querySelector('main');
const background = {
color: 'Very-Dark-Gray: hsl(0, 0%, 27%)'
}
hamburger.addEventListener('click', () => {
ul.style.display = 'flex';
closeBtn.style.display = 'inline';
logo.style.display = 'none';
hamburger.style.display = 'none'
document.getElementById('main').style.backgroundColor = "#808088";
// main.style.backgroundColor = background;
// main.style.opacity = 0.5;
})
closeBtn.addEventListener('click', () => {
ul.style.display = 'none';
logo.style.display = 'flex';
hamburger.style.display = 'block';
document.getElementById('main').style.backgroundColor = "initial"
})
// function fadeInFadeOut(num) {
// if (hamburger.addEventListener('click'), () => {
// document.getElementById('main').style.backgroundColor = "#808088";
// }
// else {
// document.getElementById('main').style.backgroundColor = "initial"
// })
// do something
// console.log('Number is greeter than ten')
// } else {
// do something else
// console.log('Number is less than ten')
// }
// }