Donec id elit non mi porta gravida at eget metus. Aenean eu leo quam.
Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.
Add data-toggle="dropdown" to a link or button to toggle a dropdown.
data-toggle="dropdown"
<div class="dropdown"> <a data-toggle="dropdown" href="#">Dropdown trigger</a> <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> ... </ul> </div>
To keep URLs intact, use the data-target attribute instead of href="#".
data-target
href="#"
<div class="dropdown"> <a id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html"> Dropdown <span class="caret"></span> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> ... </ul> </div>
Call the dropdowns via JavaScript:
$('.dropdown-toggle').dropdown()