uncheck all checkbox jquery code example
Example 1: how to uncheck a checkbox in jquery
$("#myCheckBox").prop("checked", false);
Example 2: jquery uncheck checkbox
$('#myCheckbox').prop('checked', true);
$('#myCheckbox').prop('checked', false);
Example 3: select all checkboxes jquery
$('input:checkbox').prop('checked', true);
Example 4: select all checkbox jquery
$('#select_all').change(function() {
var checkboxes = $(this).closest('form').find(':checkbox');
checkboxes.prop('checked', $(this).is(':checked'));
});
Example 5: select all checkbox jquery
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form>
<table>
<tr>
<td><input type="checkbox" id="select_all" /></td>
</tr>
<tr>
<td><input type="checkbox" name="select[]" /></td>
</tr>
<tr>
<td><input type="checkbox" name="select[]" /></td>
</tr>
<tr>
<td><input type="checkbox" name="select[]" /></td>
</tr>
</table>
</form>