1

hello everyone I would like to ask for help because my dropdown is in trouble, as you can see in the link below , it has two tabs , the problem is when you have to change page to see the contents of the one in question , but when you try page to change the dropdown closes. Who can help ? Link:https://jsfiddle.net/f0yzyryL/<i>please help</i>

Nikk 17016
  • 115
  • 4

2 Answers2

2

Use this code:

$(".nav li").click(function() {
  $(".dropdown-menu").addClass("nav-open");
});

Add this css:

.nav-open {
  display: block !important;
}

here is a link: https://jsfiddle.net/vexqhyb9/1/

Johncena365
  • 146
  • 3
1

https://jsfiddle.net/9tywtn6z/

Added js variant from http://getbootstrap.com/javascript/#tabs-usage

instead of http://getbootstrap.com/javascript/#markup

$('#tabs a').click(function (e) {
  e.preventDefault()
  $(this).tab('show');
  return false;
})

and removed data-toggle="tab" attr

(or you can use http://getbootstrap.com/javascript/#tabs-events to prevent bubbling)

return false; preventing bubbling in jquery - https://css-tricks.com/return-false-and-prevent-default/

llamerr
  • 2,997
  • 4
  • 29
  • 40