This is my checkbox in my form.
<div id="check" class="form-group">
<input type="checkbox" name="carry_forward" id="carr" value="1" <?php if( $row[0]->carry_forward == 1) echo 'checked';?>> Carry Forward leave
</div>
This is my jquery for on changing checkbox which is working
$("input[name=carry_forward]").change(function(){
if($(this).prop('checked')){
//alert('checked');
$('#start_time1').show();
}else{
$('#start_time1').hide();
//alert('unchecked');
}
});
but while editing the form the checkbox is showing that it is checked but the div i.e start_time1 is not showing up even if the checkbox is checked ,
How can I do that ?