Answers for "dropdown ul li bootstrap 4"

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

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