1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Fixes #14791: document dropdown dividers

This commit is contained in:
Mark Otto 2014-10-25 18:44:55 -07:00
parent 9bf9aab132
commit e795ea1084
2 changed files with 25 additions and 4 deletions

View file

@ -15,7 +15,6 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul> </ul>
</div> </div>
@ -30,7 +29,6 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul> </ul>
</div> </div>
@ -65,7 +63,6 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation" class="dropdown-header">Dropdown header</li> <li role="presentation" class="dropdown-header">Dropdown header</li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul> </ul>
@ -73,10 +70,33 @@
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2"> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
...
<li role="presentation" class="dropdown-header">Dropdown header</li> <li role="presentation" class="dropdown-header">Dropdown header</li>
... ...
</ul>
{% endhighlight %}
<h3 id="dropdowns-divider">Divider</h3>
<p>Add a divider to separate series of links in a dropdown menu.</p>
<div class="bs-example">
<div class="dropdown clearfix">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</div>
</div><!-- /example -->
{% highlight html %}
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
...
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
<li role="presentation" class="dropdown-header">Dropdown header</li>
... ...
</ul> </ul>
{% endhighlight %} {% endhighlight %}

View file

@ -12,6 +12,7 @@
<li><a href="#dropdowns-example">Example</a></li> <li><a href="#dropdowns-example">Example</a></li>
<li><a href="#dropdowns-alignment">Alignment options</a></li> <li><a href="#dropdowns-alignment">Alignment options</a></li>
<li><a href="#dropdowns-headers">Headers</a></li> <li><a href="#dropdowns-headers">Headers</a></li>
<li><a href="#dropdowns-divider">Divider</a></li>
<li><a href="#dropdowns-disabled">Disabled menu items</a></li> <li><a href="#dropdowns-disabled">Disabled menu items</a></li>
</ul> </ul>
</li> </li>