javascript - Bootstrap 3: Setting a default nav option with dropdowns -


i have bootstrap 3 page displays set of tabs containing dropdowns. looks great, have 1 of tabs open default when page loads. currently, first tab option set "active", contents of tab not displayed.

how make contents of particular bootstrap dropdown choice display when page loaded?

here's code: fiddle

<ul class="nav nav-tabs">     <li class="dropdown active"> <a href="#" id="firsttab" class="dropdown-toggle active" data-toggle="dropdown">first tab <b class="caret"></b></a>         <ul class="dropdown-menu" role="menu" aria-labelledby="firsttab">             <li class="active">                 <a href="#one" tabindex="-1" data-toggle="tab">one</a>             </li>             <li>                 <a href="#two" tabindex="-1" data-toggle="tab">two</a>             </li>         </ul>     </li> </ul> <div class="tab-content">     <div class="tab-pane fade" id="one">selected tab: 1 (should open/active default)</div>     <div class="tab-pane fade" id="two">selected tab: two</div> </div> 

to solve problem give first tab class "tab-pane active" instead of "tab-pane fade" , go.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -