I followed the answer here to get my links to collapse the expanded navbar whenever it's in that dropdown mode:
Programatically toggle bootstrap 3 navigation bar
However when it's NOT in the dropdown mode (desktop), I get a weird "collapse" animation on my regular non-mobile navbar for a split second - it alternates from fading the text of my buttons away between up and down, as if it's trying to collapse the dropped-down navbar that isn't there, so it does it to the content of my main navbar instead.
I have the following code for my menu links:
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<!--ko foreach: authorizedRoutes -->
<li>
<a data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"></a>
</li>
<!-- /ko -->
</ul>
</div>
And this for my collapse icon:
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" toggle="offline">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
What would be causing this weird glitch?
Here's a jsfiddle where the behavior can be seen - (shrink/expand your browser to see the modes - expanded is where the glitch occurs): http://jsfiddle.net/D2Gsa/11/