@MLimad
Posted
Hello .. From your code Html remove input checkbox and in the script js add some changes like this
const open = document.getElementById('open'); const close = document.getElementById('close'); const menu = document.getElementById('container'); const page = document.getElementById('page'); const navebar = document.getElementById('navebar');
// Open DropDown open.addEventListener('click', function() { open.style.display = 'none'; close.style.display = 'block'; menu.style.display = 'block'; }); // Close DropDown close.addEventListener('click', function() { open.style.display = 'block'; close.style.display = 'close'; menu.style.display = 'none'; });
like you see i removed input variable and i created two functions one for open the dropdown and the other for close it