jquery checkbox check event code example
Example 1: checkbox click event jquery
$('input[type="checkbox"]').click(function(){
if($(this).is(":checked")){
//input element where you put value
$("#isClicked").val("Yes");
// console.log($("#isClicked").val());
}
else if($(this).is(":not(:checked)")){
$("#isClicked").val("");
// console.log( $("#isClicked").val());
}
});
Example 2: check checkbox by jquery
$('.myCheckbox')[0].checked = true;
$('.myCheckbox')[0].checked = false;