Answers for "jquery check if all checkbox is not checked"

4

jquery check if checkbox is not checked

if (!$("#checkboxID").is(":checked")) {
    // do something if the checkbox is NOT checked
}
Posted by: Guest on May-07-2020
1

jquery validate all checkbox checked

<form id="form1" action="/controller/action" method="post">
   <input type="checkbox" name="box1" class="cBox" />
   <input type="checkbox" name="box2" class="cBox" />
   <input type="checkbox" name="box3" class="cBox" />
  <input type="submit" value="Submit" />
</form>
<script>
$('#form1').submit(function() {
   if ($('input:checkbox', this).length == $('input:checked', this).length ) {
            // everything's fine...
   } else {
            alert('Please tick all checkboxes!');
            return false;
   }
});
</script>
Posted by: Guest on May-25-2021
0

jquery check if all checkbox is not checked

$('#checkAll').click(function () {    
     $('input:checkbox').prop('checked', this.checked);    
 });
Posted by: Guest on August-12-2020

Code answers related to "jquery check if all checkbox is not checked"

Code answers related to "Javascript"

Browse Popular Code Answers by Language