I need to make a toogel check box but i have tried them but i could run them can any one suggest me to have this

function checktoogel() {


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);

var a = $(‘chk2);
if(a.length == a.filter(":checked").length){
$(’#chk1’).prop(‘checked’, true);
else {
$(’#chk1’).prop(‘checked’, false);