Answers for "bootstrap 4 dropdown list"

11

create a dropdown in html bootstrap

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropdown
  </button>
  <div class="dropdown-menu" aria-labelledby="dropdownMenu2">
    <button class="dropdown-item" type="button">Action</button>
    <button class="dropdown-item" type="button">Another action</button>
    <button class="dropdown-item" type="button">Something else here</button>
  </div>
</div>
Posted by: Guest on May-28-2020
0

dropdown bootstrap

<div class="dropdown show">
  <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropdown link
  </a>

  <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
    <a class="dropdown-item" href="#">Action</a>
    <a class="dropdown-item" href="#">Another action</a>
    <a class="dropdown-item" href="#">Something else here</a>
  </div>
</div>
Posted by: Guest on December-06-2020
0

bootstrap 4 dropdown item list style

$(document).ready(function() {
  $(".dropdown-menu li a").click(function(e) {
    e.preventDefault();
    $(".dropdown-menu li").removeClass('activeTabLink');
    var activeAttr = $(this).parent('li').addClass('activeTabLink');
  });
});
Posted by: Guest on February-22-2021

Browse Popular Code Answers by Language