How to close one javascript drop down menu when opening another?
addEventListener("click", event => // start by closing every dropdown for (let dd of dropdown) dd. classList. toggle("open", false); // then if a link was clicked, open the associated dropdown if (event. target.