Ajout des fichiers
This commit is contained in:
22
burguer.js
Normal file
22
burguer.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var sidenav = document.getElementById("monSidenav");
|
||||
var openBtn = document.getElementById("openBtn");
|
||||
var closeBtn = document.getElementById("closeBtn");
|
||||
|
||||
openBtn.onclick = openNav;
|
||||
closeBtn.onclick = closeNav;
|
||||
|
||||
/* Set the width of the side navigation to 250px */
|
||||
function openNav() {
|
||||
sidenav.classList.add("active");
|
||||
for(let i = 0; i != 4; i++) {
|
||||
boutons[i].style.display="block";
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the width of the side navigation to 0 */
|
||||
function closeNav() {
|
||||
sidenav.classList.remove("active");
|
||||
for(let i = 0; i != 4; i++) {
|
||||
boutons[i].style.display="none";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user