简体   繁体   English

默认情况下,Twitter Bootstrap nav-tab未加载

[英]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. 我已经使用Bootstrap创建了一个nav-tab,但是在单击其他选项卡之前,第一个选项卡不会自动加载。 After other tabs are clicked the first tab can be used. 单击其他选项卡后,可以使用第一个选项卡。

Here is the fiddle: http://jsfiddle.net/GGMWX/416/ 这是小提琴: 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>

您需要将tab-pane设置为默认active以及li

<form class="form-inline tab-pane active" id="1">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM