jquery check if checkbox is unchecked code example

Example 1: jquery check if checkbox is not checked

if (!$("#checkboxID").is(":checked")) {
    // do something if the checkbox is NOT checked
}

Example 2: How do I check whether a checkbox is checked in jQuery?

$('#' + id).is(":checked")

Example 3: check whether a checkbox is checked in jQuery

if ($('#grepperRocks').is(':checked')) {
	// this checkbox is checked
}

Example 4: get unchecked checkbox jquery

if ($("#check_box_id").is(':checked')) {
  alert("checked");
}else{
  alert("unchecked");
}

Example 5: jquery checkbox unchecked

$("input:radio[name='NAME']:radio[value='VALUE']").attr("checked",true);
$("input:radio[name='NAME']").removeAttr("checked");