forked from yogitha02/Portfolio-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
27 lines (23 loc) · 905 Bytes
/
script.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
const sideBar = document.getElementById("mySidebar");
const main = document.getElementById("main");
const hamburger = document.getElementById("hamburger");
const toggleNav = () => {
sideBar.classList.toggle("show");
main.classList.toggle("show");
hamburger.classList.toggle("fa-bars");
hamburger.classList.toggle("fa-xmark");
};
function toggleDarkMode() {
var element = document.body;
element.classList.toggle("dark-mode");
}
// function openNav() {
// document.getElementById("sidebar_link").style.opacity = "1"
// document.getElementById("main").style.marginLeft = "250px"
// document.getElementById("mySidebar").style.width = "250px"
// }
// function closeNav() {
// document.getElementById("main").style.marginLeft = "0"
// document.getElementById("mySidebar").style.width = "0"
// document.getElementById("sidebar_link").style.opacity = "0"
// }