-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
24 lines (22 loc) · 779 Bytes
/
main.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
const menuIcon = document.getElementById("menu-icon");
const slideoutMenu = document.getElementById("slideout-menu");
const searchIcon = document.getElementById("search-icon");
const searchBox = document.getElementById("searchbox");
searchIcon.addEventListener('click', function () {
if (searchBox.style.top == '72px') {
searchBox.style.top = '24px';
searchBox.style.pointerEvents = 'none';
} else {
searchBox.style.top = '72px';
searchBox.style.pointerEvents = 'auto';
}
});
menuIcon.addEventListener('click', function () {
if (slideoutMenu.style.opacity == "1") {
slideoutMenu.style.opacity = '0';
slideoutMenu.style.pointerEvents = 'none';
} else {
slideoutMenu.style.opacity = '1';
slideoutMenu.style.pointerEvents = 'auto';
}
})