我知道这个问题问了很多次,但我又问了一次,
您能帮我吗,我有一张您可以在下面检查的表格
<form role="form" id="form-case-verification" name="form-case-verification" method="post" enctype="multipart/form-data" action="action.php" >
<div class="box-header with-border">
<h3 class="box-title">Create New Case</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="casename">Name <font color="red">*</font></label>
<input type="text" placeholder="Employee Name" id="casename" name="casename" class="form-control" value="" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="casefathername">Father Name <font color="red">*</font></label>
<input type="text" placeholder="Father Name" id="casefathername" name="casefathername" class="form-control" value=""/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="caseemail">Email ID <font color="red">*</font></label>
<input type="text" placeholder="Email ID for communication" id="caseemail" name="caseemail" class="form-control" value="" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="casemobile">Mobile </label>
<input type="text" placeholder="Mobile for contact" id="casemobile" name="casemobile" class="form-control" value="" />
</div>
</div>
<div class="col-md-12 underline">
<label>Select Verification</label>
</div>
<div class="col-md-4">
<div class="checkbox icheck">
<label>
<input type="checkbox" tabindex="4" name="addressverification" id="addressverification" value="0" > Address Verification
</label>
</div>
</div>
<div class="col-md-4">
<div class="checkbox icheck">
<label>
<input type="checkbox" tabindex="4" name="identityverification" id="identityverification" value="0" > Identity Verification
</label>
</div>
</div>
<div class="col-md-4">
<div class="checkbox icheck">
<label>
<input type="checkbox" tabindex="4" name="criminalverification" id="criminalverification" value="0" > Criminal Verification
</label>
</div>
</div>
<div class="col-md-4">
<div class="checkbox icheck">
<label>
<input type="checkbox" tabindex="4" name="educationverification" id="educationverification" value="0" > Education Verification
</label>
</div>
</div>
</div><!-- /.row -->
</div>
<div class="box-footer">
<button class="btn btn-primary" type="submit">Submit <i class="fa fa-arrow-circle-right"></i></button>
<a class="btn btn-primary pull-right" id="form-cancel">Cancel</a>
</div>
</form>
这是我为用户添加新案例的表单,在此表单中,我正在验证每个字段,并通过jquery验证可以在下面进行检查
$(function () {
$(document).ready(function(){
if ( typeof $.fn.validate!== 'undefined' && $.isFunction($.fn.validate) ){
$('#form-case-verification').validate({
ignore: "",
rules:{
casename:{
required:true,
},
casefathername:{
required:true,
},
caseemail:{
required:true,
},
casemobile:{
required:true,
},
'caseverification[]':{
required:true,
},
},
messages:{
},
onfocusout: function(elements){
$(elements).valid();
}
});
}
$('[data-toggle="popover"]').popover({html:true});
});
});
这是我的jquery代码,一切正常,但是当我选中一个复选框时,它不会自动隐藏所需文件的弹出窗口
能帮我找到此代码的解决方案吗?