I am currently using a form wizard:
<form name="example-1" id="wrapped" action="" method="POST">
<div id="middle-wizard">
<div class="step">
</div>
<div class="step">
</div>
<div class="step">
<div class="row">
<div class="col-md-6">
<ul class="data-list-2 clearfix">
<li><input name="information[]" id ="other_info" class="otherInfo check_radio" type="checkbox" value="Others"><label>Others</label></li>
</ul>
</div>
</div>
</div>
</div>
<div id="bottom-wizard">
<button type="button" name="backward" class="backward"> Backward </button>
<button type="button" name="forward" class="forward"> Forward </button>
</div>
</form>
I am trying to check if the checkbox is checked or not. First thing I did was to console log the id of the checkbox.
The console returns the checkbox but when I tried to create a click function on the checkbox id, the on click function doesn't throw a console log.
Here's the sample of the on click function I tried:
console.log('#other_info')
$("#other_info").click(function(){
if(!$(this).is(':checked'))
{
console.log('yes its checked')
}
else
{
console.log('no its not!!')
}
})
this form uses iCheck custom plugin for checkboxes so a normal click or change function will not work. done fixing the problem by using the custom function provided from ichecked