2016-12-14 67 views
0

使用下面的代碼,我無法很好地使用標籤的導航。發生了什麼事情當我點擊前兩個標籤 - 聲明和優惠時,它會顯示相關內容並隱藏較早的標籤。但是當我點擊學生時,它只會將學生的內容添加到現有的內容中。現有的一個不會消失。我在做什麼錯誤?需要改進嗎?我正在使用最新的引導版本。實時預覽可在http://www.asmsocplacements.dx.am/adheretest.php3rd Bootstrap Nav-tab not opening

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> 
 
<div role="tabpanel"> 
 
    <ul class="nav nav-tabs" role="tablist"> 
 
    <li role="presentation" class="active"><a href="#home1" data-toggle="tab" role="tab" aria-controls="tab1">Notices</a></li> 
 
    <li role="presentation"><a href="#paneTwo2" data-toggle="tab" role="tab" aria-controls="tab2">Offers</a></li> 
 
    <li role="presentation"><a href="#paneTwo1" data-toggle="tab" role="tab" aria-controls="tab2">Students</a></li> 
 
    <li role="presentation"><a href="changepassword.php">Change Password</a></li> 
 
    <li role="presentation"><a href="logout.php">Logout</a></li> 
 
    </ul> 
 
    <div id="tabContent1" class="tab-content"> 
 
    <div role="tabpanel" class="tab-pane fade in active" id="home1"> 
 
     <?php include 'adminnotices.php'; ?> 
 
    </div> 
 
    <div role="tabpanel" class="tab-pane fade" id="paneTwo2"> 
 
     <?php include 'adminoffers.php'; ?> 
 
    </div> 
 
    <div role="tabpanel" class="tab-pane fade" id="paneTwo1"> 
 
     <?php include 'adminstudents.php'; ?> 
 
    </div> 
 
    </div> 
 
</div>

+0

您應該使用鏈路和多部未華窗格您已經使用 –

+0

能否請你說明所有的李中可以看出。我無法理解。 – user3017778

回答

-1
<div role="tabpanel"> 
    <ul class="nav nav-tabs" role="tablist"> 
    <li role="presentation" class="active"><a href="#home1" data-toggle="tab" role="tab" aria-controls="tab1">Notices</a></li> 
    <li role="presentation"><a href="#paneTwo2" data-toggle="tab" role="tab" aria-controls="tab2">Offers</a></li> 
    <li role="presentation"><a href="#paneTwo1" data-toggle="tab" role="tab" aria-controls="tab2">Students</a></li> 
    <li role="presentation"><a href="#paneTwo3">Change Password</a></li> 
    <li role="presentation"><a href="#paneTwo4">Logout</a></li> 
    </ul> 
    <div id="tabContent1" class="tab-content"> 
    <div role="tabpanel" class="tab-pane fade in active" id="home1"> 
     <?php include 'adminnotices.php'; ?> 
    </div> 
    <div role="tabpanel" class="tab-pane fade" id="paneTwo2"> 
     <?php include 'adminoffers.php'; ?> 
    </div> 
    <div role="tabpanel" class="tab-pane fade" id="paneTwo1"> 
     <?php include 'adminstudents.php'; ?> 
    </div> 
<div role="tabpanel" class="tab-pane fade" id="paneTwo3"> 
     <?php include 'adminstudents.php'; ?> 
    </div> 
<div role="tabpanel" class="tab-pane fade" id="paneTwo4"> 
     <?php include 'adminstudents.php'; ?> 
    </div> 
</div> 
    </div>