我原本在ASP.Net項目中的代碼,但試圖排除故障,我把它移動到一個單獨的Web服務器,但我仍然無法得到它與buttons.Any之間切換標籤窗格幫助調試這將不勝感激。不能得到jquery點擊更改類
腳本代碼
$('.continue').click(function() {
$('.nav-tabs > .active').next('li').find('a').trigger('click');
});
$('.back').click(function() {
$('.nav-tabs> .active').prev('li').find('a').trigger('click');
});
HTML
<ul class="nav nav-tabs" >
<li class="presentation" aria-controls="incident" class="active">
<a href="#incident" data-toggle="tab">Incident</a>
</li>
<li>
<a href="#timesmileage" data-toggle="tab">Times/Mileage</a>
</li>
<li>
<a href="#patient" data-toggle="tab">Patient</a>
</li>
<li>
<a href="#billing" data-toggle="tab">Billing</a>
</li>
<li>
<a href="#scene" data-toggle="tab">Scene</a>
</li>
</ul>
<div class="row">
<a class="btn btn-primary back">Go Back</a>
<a class="btn btn-primary continue">Continue</a>
</div>