-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.js
34 lines (27 loc) · 894 Bytes
/
style.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
const mainMenu = document.querySelector('.mainMenu');
const closeMenu = document.querySelector('.closeMenu');
const openMenu = document.querySelector('.openMenu');
function show() {
mainMenu.style.display = 'flex';
mainMenu.style.top = '0';
}
function close() {
mainMenu.style.top = '-100vh';
mainMenu.style.display = 'none';
}
openMenu.addEventListener('click', show);
closeMenu.addEventListener('click', close);
/** More Button */
const moreButton = document.querySelector('.show-more');
const dispNone = document.querySelector('.dis-none1');
const lessButton = document.querySelector('.show-less');
function showB() {
dispNone.style.display = 'block';
moreButton.style.display = 'none';
}
function hideB() {
dispNone.style.display = 'none';
moreButton.style.display = 'block';
}
moreButton.addEventListener('click', showB);
lessButton.addEventListener('click', hideB);