skip to Main Content

Css – Display styling won't change

const hamburgerMenuBtn = document.getElementById("hamburger-menu-button"); hamburgerMenuBtn.addEventListener("click", function() { hamburgerPopupToggle() }); function hamburgerPopupToggle() { console.log("Button pressed"); const hamburgerMenuPopup = document.getElementById("hamburger-menu-popup"); if (hamburgerMenuPopup.style.display === "block") { hamburgerMenuPopup.style.display = "none"; console.log(hamburgerMenuPopup.style.display); } else { hamburgerMenuPopup.style.display = "block"; console.log(hamburgerMenuPopup.style.display); } } #hamburger-menu-popup { display: none;…

VIEW QUESTION
Back To Top
Search