Tabs making the dropdown close

0

Someone can help me, I put the tabs inside a dropdown and when I change the tab the dropdown closes.

                Login                                                                         Login New               Post new topic Reply to topic             

        <div class="tab-content">
          <div role="tabpanel" class="tab-pane active" id="novo">
            <div class="input-group">
              <span class="input-group-addon" id="basic-addon1"><i class="fa fa-user" aria-hidden="true"></i></span>
              <input type="text" class="form-control" placeholder="usuario@apelido" aria-describedby="basic-addon1">
            </div>
            <div class="input-group">
              <span class="input-group-addon" id="basic-addon1"><i class="fa fa-lock" aria-hidden="true"></i></span>
              <input type="password" class="form-control" placeholder="Senha" aria-describedby="basic-addon1">
            </div>
            <button type="button" class="btn btn-primary" aria-haspopup="true">Acessar</button>
            <p><i class="fa fa-lock" aria-hidden="true"></i> &nbsp;<a href="#">Esqueci minha senha</a></p>
          </div>
          <div role="tabpanel" class="tab-pane" id="antigo">
            <div class="input-group">
              <span class="input-group-addon" id="basic-addon1"><i class="fa fa-user" aria-hidden="true"></i></span>
              <input type="text" class="form-control" placeholder="Código do Cliente" aria-describedby="basic-addon1">
            </div>
            <div class="input-group">
              <span class="input-group-addon" id="basic-addon1"><i class="fa fa-lock" aria-hidden="true"></i></span>
              <input type="password" class="form-control" placeholder="Senha" aria-describedby="basic-addon1">
            </div>
            <button type="button" class="btn btn-primary" aria-haspopup="true">Acessar</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</article>
    
asked by anonymous 20.04.2017 / 21:47

1 answer

0

solved with javascript code

$('.dropdown-menu a[data-toggle="tab"]').click(function(e) {
    e.stopPropagation()
    $(this).tab('show')
})
    
24.04.2017 / 18:44