Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap nav-tab not loading by default

I have created a nav-tab with Bootstrap however, the first tab does not auto-load until other tabs are clicked. After other tabs are clicked the first tab can be used.

Here is the fiddle: http://jsfiddle.net/GGMWX/416/

Basically, once the script loads, the Delete nav-tab is not showing the Delete Button. Its only when I click either the Promote or Revert nav-tabs that the Delete nav-tab becomes active and loads.

      <!-- Body content -->
  <ul class="nav nav-tabs nav-justified" data-tabs="tabs">
     <li class="active"><a href="#1" data-toggle="tab">Delete File</a></li>
     <li><a href="#2" data-toggle="tab">Promote</a></li>
     <li><a href="#3" data-toggle="tab">Revert</a></li>
  </ul>

  <br>
     <form class="form-inline tab-pane" id="1">
     <input class="btn btn-primary" id="deleteFileButton" type="button" value="Delete File" />
     </form>

         <form class="form-inline tab-pane" id="2">
    <input class="btn btn-primary" id="promoteManifestButton" type="button" value="Promote" />
     </form>

     <form class="form-inline tab-pane" id="3">
    <input class="btn btn-primary" id="revertButton" type="button" value="Revert Release" />
     </form>
</div>
like image 937
rmoh21 Avatar asked Aug 01 '13 00:08

rmoh21


1 Answers

You need to set your tab-pane to active by default as well as the li:

<form class="form-inline tab-pane active" id="1">
like image 93
Brian Genisio Avatar answered Sep 25 '22 04:09

Brian Genisio