Error when using two dropdown menus

0

I have two menus and when I click on 1 the 2 are triggered. How should I resolve this?

<div class="row">
                <div class="btn btn-group pull-right">
                    <!-- Inicio Menu DropDown -->
                    <button type="button" class="btn btn-danger">Equipamento</button>
                    <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <span class="caret"></span>
                    <span class="sr-only">Toggle Dropdown</span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="inventario.php">Inventário</a></li>
                        <li><a  href="material-hist.php">Hist Material OS</a></li>
                        <li><a  href="material-lista.php" alt="Edição de Material por OS" title="Edição de Material por OS">Edição Equipamento</a></li>
                    </ul>
                    <!-- Fim Menu DropDown -->                       

                    <!-- Inicio Menu DropDown -->
                    <button type="button" class="btn btn-danger">OS</button>
                    <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <span class="caret"></span>
                    <span class="sr-only">Toggle Dropdown</span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                      <li><a href="os-lista.php">Lista de OS</a></li>
                      <li><a href="custo-setor.php">Custo por Setor</a></li>                        
                    </ul>
                    <!-- Fim Menu DropDown -->


                    <a href="logout.php" class="btn btn-danger"><span class="glyphicon glyphicon-share-alt">&nbsp;Sair</span></a>

                </div>
            </div>

    
asked by anonymous 30.11.2016 / 17:29

1 answer

1

Grouping the button groups works:

<div class="btn-group pull-right">
            <!-- Inicio Menu DropDown -->
            <button type="button" class="btn btn-danger">Equipamento</button>
            <div class="btn-group">
                <button id="btn1" type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <span class="caret"></span>
                    <span class="sr-only">Toggle Dropdown</span>
                </button>
                <ul class="dropdown-menu" role="menu" aria-labelledby="btn1">
                    <li><a href="inventario.php">Inventário</a></li>
                    <li><a  href="material-hist.php">Hist Material OS</a></li>
                    <li><a  href="material-lista.php" alt="Edição de Material por OS" title="Edição de Material por OS">Edição Equipamento</a></li>
                </ul>
            </div>
            <div class="btn-group">
                <!-- Fim Menu DropDown -->     

                <!-- Inicio Menu DropDown -->
                <button type="button" class="btn btn-danger">OS</button>
                <button id="btn2" type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <span class="caret"></span>
                    <span class="sr-only">Toggle Dropdown</span>
                </button>
                <ul class="dropdown-menu" role="menu" aria-labelledby="btn2">
                    <li><a href="os-lista.php">Lista de OS</a></li>
                    <li><a href="custo-setor.php">Custo por Setor</a></li>                        
                </ul>
                <!-- Fim Menu DropDown -->
            </div>
            <a href="logout.php" class="btn btn-danger"><span class="glyphicon glyphicon-share-alt">&nbsp;Sair</span></a>

        </div>
    
30.11.2016 / 17:35