当条件为id属性为制造且类属性处于活动状态时,我想获取数据。
我的观点:
<li id="manufacture">
<a data-toggle="tab" href="#faq-tab" id="warranty">Samsung</a>
<textarea class="ckeditor" name="description_warranty" style="height: 400px;" rows="3" placeholder="Enter text . . . " >'+data[i].description_warranty+'</textarea>
</li>
<li id="manufacture" class="active">
<a data-toggle="tab" href="#faq-tab" id="warranty">Apple </a>
<textarea class="ckeditor" name="description_warranty" style="height: 400px;" rows="3" placeholder="Enter text . . . " >'+data[i].description_warranty+'</textarea>
</li>
<li><button data-toggle="tab" id="btnsaving" onclick="save()" class="btn btn-lg btn-success">
<i class="White ace-icon fa fa-save bigger-130"></i>Save</button>
</li>
Ajax Save():
var url;
if($('#manufacture')) {
url = "<?php echo base_url('admin-spot/company/AddBranch')?>";
}else{
$('#modal_form').modal('show'); // show bootstrap modal
$('.modal-title').text('WARNING!!!');//modal title
}
任何解决方案,所以当