When navigating through a responsive top menu with Bootstrap, everything works seamlessly - from toggling the menu to dropdown functionality. However, I encountered an issue with the side menu as nav-pills used to select tab-panes.
<div class="container-fluid">
<div class="row">
<div class="col-xs-1 col-sm-3">
<div class="dropdown">
<button type="button" class="btn btn-default dropdown-toggle xs-toggle" id="dropmenu" data-toggle="dropdown">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<ul class="nav nav-pills nav-stacked dropdown-menu" role="menu" aria-labelledby="dropmenu" aria-haspopup="true" aria-expanded="false">
<li class="nav-item" role="presentation"><a role="menuitem" class="dropdown-item nav-link" tabindex="-1" href="#goitem1" data-toggle="pill">Item1</a></li>
<li class="nav-item" role="presentation"><a role="menuitem" class="dropdown-item nav-link" tabindex="-1" href="#goitem2" data-toggle="pill">Item2</a></li>
<li class="nav-item" role="presentation"><a role="menuitem" class="dropdown-item nav-link" tabindex="-1" href="#goitem3" data-toggle="pill">Item3</a></li>
</ul>
<ul class="nav nav-pills nav-stacked xs-collapse" id="TabItems">
<li class="active"><a href="#goitem1" data-toggle="pill">Item1</a></li>
<li><a href="#goitem2" data-toggle="pill">Item2</a></li>
<li><a href="#goitem3" data-toggle="pill">Item3</a></li>
</ul>
</div>
</div>
<div class="col-xs-10 col-sm-7">
<div class="maincontent">
...
</div>
</div>
</div>
</div>
As the window minimizes, the nav-pills menu vanishes and the dropdown button appears. Clicking on the button reveals the dropdown selections, which can be interacted with by clicking on each menu item to display its respective content.
However, there seems to be a hiccup after selecting a menu item once - subsequent clicks do not trigger any action. As my expertise in JavaScript is limited, sticking to HTML and CSS along with Bootstrap, I'm at a loss as to what's causing this behavior.
Your insights into how to resolve this issue would be greatly appreciated. An in-depth understanding of the underlying mechanics could help shed light on the problem at hand.
I've included relevant CSS:
.maincontent{
background-color: #ffffff;
color: #000;
opacity: 0.9;
padding: 5%;
border: 10px outset #d22814;
}
.xs-collapse {
display: none;
visibility: hidden;
}
...