How can I add a dropdown menu to custom link in Boostrap?. It is described through official Bootstrap components page how to add dropdown only for clickable buttons not for custom links.
1 Answer
Not sure if this is what you're looking for
<div class="dropdown">
<a class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
Link
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<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>
3 Comments
ɐsɹǝʌ ǝɔıʌ
You can include the link wherever you want. Please note that every
<li> element into the dropdown has a <a href> link