当我点击提交按钮时,我想打开相同的标签,因为我认为我可以通过调用标签索引使标签处于活动状态,但我怎样才能实现?
<!-- Added via Snippet -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<ul>
<li id="client">
<a data-toggle="tab" href="#commonclientlist">My Clients</a>
</li>
<li>
<a data-toggle="tab" href="#developers">Developers</a>
</li>
<li id="brokerheader">
<a data-toggle="tab" href="#brokers">Brokers</a>
</li>
<li>
<a data-toggle="tab" href="#serviceproviders">My Service Providers</a>
</li>
</ul>
<div class="tab-content">
<div id="commonclientlist" class="tab-pane fade ">
<?php include APPPATH . 'views/client/list_clients.php'; ?>
</div>
<div id="developers" class="tab-pane fade">
<?php include APPPATH . 'views/mycontacts/developerslist.php'; ?>
</div>
<div id="brokers" class="tab-pane fade">
<?php include APPPATH . 'views/mycontacts/brokerslist.php'; ?>
</div>
<div id="serviceproviders" class="tab-pane fade">
<?php include APPPATH . 'views/service/listserviceprovider.php'; ?>
</div>
</div>
&#13;
.tabs(???)
&#13;
我不知道在jQuery代码中要在{{1}}中写什么。有人可以帮助我吗?
答案 0 :(得分:0)
成功回调中的这个怎么样?
$('#brokerheader').tab('show');