1
即時將jquery UI選項卡應用到我的應用程序,我即將對此應用jQuery的驗證類。我的問題是,如果我在某些div中出現錯誤,應該選擇div,並在點擊保存按鈕時向用戶顯示錯誤。如何選擇jquery選項卡,如果errorLable顯示
我試圖
$('#tabs > div').each(function(i){
if($('.errortd', this).not(':hidden').length>0){
$("#tabs").tabs('select', i);
});
});
但我有沒有運氣任何幫助的感謝很多
我的標籤的div
<div id="tabs">
<ul>
<li><a href="#editEmployeeDIV"><?php echo __("View/Edit employees") ?></a></li>
<li><a href="#addEmployeeDIV"><?php echo __("Assign new employees") ?></a></li>
</ul>
<div id="editEmployeeDIV">
</div>
<div id="editEmployeeDIV">
</div>
</div>
我的錯誤標貼上課errortd
<label for="txtAmount_146" generated="true" class="errortd" style="display: none; ">This field is required.</label>
你真是個回答它的工作完美感謝你先生的天才。 –