-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
31 lines (30 loc) · 867 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
25
26
27
28
29
30
31
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';
}
});
function change(){
var x=document.getElementById('nabar');
x.style.fontSize = "25px";
x.style.color = "yellow";
}