Answers for "bootstrap dropdown not toggling"

0

bootstrap dropdown toggle show until closed

// Prevents menu from closing when clicked inside 
        document.getElementById("Dropdown").addEventListener('click', function (event) { 
            alert("click outside"); 
            event.stopPropagation(); 
        });
Posted by: Guest on February-19-2021
0

dropdown menu bootstrap

<div class="collapse navbar-collapse">
    <ul class="navbar-nav mr-auto">
      	<li class="nav-item">
      		<a class="nav-link" href="#">Clientes</a>
      	</li>
      	<li class="nav-item">
      		<a class="nav-link" href="#">Fornecedores</a>
      	</li>
     	<li class="nav-item dropdown">
          <a  class="nav-link dropdown-toggle" href="#" data-toggle="dropdown">
            Veículos
          </a>
          <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Carros</a>
            <a class="dropdown-item" href="#">Marcas</a>
            <a class="dropdown-item" href="#">Modelos</a>
          </div>
    	</li>
	</ul>
</div>
Posted by: Guest on October-08-2021

Browse Popular Code Answers by Language