的標籤窗格我嘗試設置活躍的一類表的引導?Set類活躍在tabbable引導
<div class="tabbable tabs-left">
<ul class="nav nav-tabs">
<?php
foreach ($this->aliasRead as $key => $value):
echo '<li class="active"><a href="#'.$value[0].'" data-toggle="tab">'.$value[0].'
<button class="btn btn-danger" ><i class="icon-trash icon-white"></i></button></a>
</li>
';
endforeach;
?>
</ul>
<div class="tab-content">
<?php foreach ($this->aliasRead as $key => $value):
echo '<div class="tab-pane active" id="'.$value[0].'">';
?>
<H4>Alias redirigé vers l'adresse :
<button href="#modifalias" role="link" data-toggle="modal" class="btn btn-primary"><i class="icon-plus icon-white"></i></button>
</H4>
<table class="table table-striped">
<tbody>
<?php foreach ($value as $key => $v):
if($key > 0)
echo '<tr>
<td>'.$v.'</td>
<td>
<button class="btn btn"><i class="icon-trash"></i></button>
</td>
</tr>';
endforeach;
?>
</tbody>
</table>
<?php endforeach; ?>
</div>
</div>
在本例中,所有標籤窗格是活動的,所有李是活動的,我只是想設置類主動當我在點擊:李
編輯
我試了一下,它是爲李的作品,當我點擊,但我嘗試設置活動的類是活躍的類標籤頁當我clik上一個李
我嘗試,不起作用。
<script type="text/javascript">
$(function(){
$('.nav-tabs li').on('click', function(event) {
$('.nav-tabs li').removeClass('active'); // remove active class from tabs
$(this).addClass('active'); // add active class to clicked tab
});
$('.nav-tabs li').on('click', function(event) {
$('.tab-content div').removeClass('active');
$('.tab-content div').addClass('active');
});
});
</script>
的probleme是LIGNE:
$('.tab-content div').addClass('active');
如何選擇正確的一個tabpanel對應於李?
編輯我的帖子,你可以看編輯? @fullybaked – mpgn
@MartialE嘗試閱讀Bootstrap http://twitter.github.io/bootstrap/javascript.html#tabs上的Javascript選項卡文檔,它解釋瞭如何在點擊選項卡鏈接 – fullybaked
已嘗試使您的內容正常工作,對我來說沒有結果。他們顯示基本的例子,但在我看來,這是更具體的我想。 – mpgn