twitter-bootstrap Dropdowns Basic HTML usage


Example

A Bootstrap dropdown is a Bootstrap component that allows an HTML element trigger the display of a sub-menu dropdown upon the element being clicked.

Here is a basic HTML usage example:

<div class="dropdown">
  <button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropdown trigger
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>

Dropdown sub-menu items can be specified by inserting li elemented within the ul element with the .dropdown-menu class.