I am encountering an issue with my dropdown menu system. I have multiple submenus within a top-level dropdown menu, and the problem is that when I open one submenu and then click to open another, the first one remains open. I would like for the other submenus to automatically close when a new one is opened.
Here is a snippet of my HTML code:
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid"> <a class="navbar-brand" href="#"> LOGO </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
<!-- Start test -->
<div class="row navbar-collapse" id="navbarCollapse">
<div class="col-md-12 order-last menu-one">
<!-- Start -->
... (omitted for brevity)
<!-- End -->
</div>
<div class="col-md-12 order-md-last menu-two">
... (omitted for brevity)
</div>
</div>
<!-- End test -->
</div>
</nav>
If you want to see the full code, it is available at:
I could really use some assistance in getting this menu system to function smoothly. Thank you!