Bootstrap 3 tab('show') on long page hides tabs -


i using el.tab('show') show bootstrap 3 tab, works when content of tab large, tabs not visible anymore because of page scrolling (this not same behavior if clicking on tab itself). idea how workaround this? thanks.

update: here sample code. tab 1 displayed default, , clicking on "go tab 2" anchor moves tab 2 contains large page. problem top tabs not visible anymore after click bottom of page embedded in tab 2 shown.

<div class="container-fluid"> <ul class="nav nav-tabs">     <li><a href="#tab_one" data-toggle="tab">tab one</a></li>     <li><a href="#tab_two" data-toggle="tab">tab two</a></li> </ul> <div class="tab-content"> <div id="tab_one" class="tab-pane fade in"> <ul>     <li><a href="#tab_two" onclick="jquery('.nav-tabs a[href=#tab_two]').tab('show')">go tab 2</a> </li> </ul> </div> <div id="tab_two" class="tab-pane fade in"> <p>content of tab 2, long page </p> </div> </div> 

found way around problem, well, not pretty:

jquery('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {     settimeout( function (e) {        window.scrollto(0,0);      }, 1); }); 

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 -

ios - Change Storyboard View using Seague -