function checktoogel() {
$(’#chk1’).checked;
this.$(’#chk2’).checked;
}
in this i have two checkbox 1 is chk1 and other is chk2 i need these to be toogel at the same
function checktoogel() {
$(’#chk1’).checked;
this.$(’#chk2’).checked;
}
in this i have two checkbox 1 is chk1 and other is chk2 i need these to be toogel at the same
sorry guys i have done with this
$(’#chk1’).click(function() {
if ($(this).is(’:checked’)) {
$(’#chk2’).prop(‘checked’, true);
} else {
$(’#chk2’).prop(‘checked’, false);
}
});
$(’#chk2’).change(function(){
var a = $(‘chk2);
if(a.length == a.filter(":checked").length){
$(’#chk1’).prop(‘checked’, true);
}
else {
$(’#chk1’).prop(‘checked’, false);
}
});