The Navigation Bar with Dropdown uses a script to open one dropdown with one id. I need more different dropdowns but don't know how to let getElementById("demo")open more id's. The construction getElementById("demo1", "demo2") doesn't work. Neither does the construction getElementByClass. Please help.
<script>
function myFunction() {
var x = document.getElementById("demo");
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
} else {
x.className = x.className.replace(" w3-show", "");
}
}
</script>