How to work with multi-level dropdown menu in bootstrap?

Asked

Viewed 1,932 times

1

I am using bootstrap and would like to know how I do to work with dropdown menu with multi-level?

<div class="btn-group">
<a href="index.php" class="btn btn-warning">Item1</a>
<a href="paroquias.php" class="btn btn-warning">Item2</a>
<div class="dropdown btn-group">
   <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
        Menu-Dropdown
    <span class="caret"></span>
    </button>
    <ul class="dropdown-menu btn btn-warning" role="menu" aria-labelledby="dropdownMenu1">
        <li><a href="#" class="btn btn-warning">Menu</a></li>   
        <li class="divider"></li>  
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
            SubMenu1
            <span class="caret"></span>
            </button>           
            <li><a href="#">SubMenu2</a></li>
            <li><a href="#">SubMenu3</a></li>
    </ul>
</div>

1 answer

1

The bootstrap no longer supports multi-level dropdown natively, but you can use an example like This one to do what you want.

  • I thought it was cool, but for some reason, it’s not working. Dei um Ctrl +C e Ctrl V e nada. Thanks.

  • You copied HTML and CSS or just HTML?

  • Both. E put in separate files. Must be some jquery that must be missing.

  • What do you recommend, @Richard?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.