I want to have a very simple navigation menu. It has to be clickable. So when using this code
It would be much easier to make a CSS class that hides the elements, which is then toggled by JS. This answer doesn't require jQuery
function toggleMenu(){
document.getElementById('navContent').classList.toggle("hidden")
}
#navContainer {
position: relative;
display: inline-block;
}
#navContent button {
display: block;
}
.hidden {
display: none;
}