-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.js
More file actions
31 lines (26 loc) · 1.09 KB
/
javascript.js
File metadata and controls
31 lines (26 loc) · 1.09 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
console.log('javascript active');
document.getElementById("menuButton2").style.opacity = "1"
document.getElementById("menuButton").style.opacity = "1"
function openSidebar() {
var screenWidth = "Total Width: " + screen.width;
console.log(screenWidth);
document.getElementById("mainMenu").style.right = "0"
document.getElementById("menuButton").style.opacity = "0"
document.getElementById("menuButton2").style.opacity = "0"
if (screen.width < 500) {
document.getElementById("body").style.overflow = "hidden"
document.getElementById("mainMenu").style.left = "0"
}
else {
document.getElementById("mainMenu").style.left = "calc(100% - 300px)"
}
document.getElementById("body").style.filter = "grayscale(100%)";
}
function closeSideBar() {
document.getElementById("body").style.overflow = "visible"
document.getElementById("mainMenu").style.right = "-300px"
document.getElementById("mainMenu").style.left = "100%"
document.getElementById("body").style.filter = "grayscale(0)";
document.getElementById("menuButton").style.opacity = "1"
document.getElementById("menuButton2").style.opacity = "1"
}