Answers for "checked all checkbox jquery"

2

jquery get all checked checkboxes

var values=[];
$('input[name="your-checkbox-name[]"]:checked').each(function () {
  values[values.length] = (this.checked ? $(this).val() : "");
});
Posted by: Guest on July-27-2021
-1

checkbox on click jquery select all

$("#checkAll").click(function(){
    $('input:checkbox').not(this).prop('checked', this.checked);
});
Posted by: Guest on October-03-2020
0

select all checkboxes jquery

$('input:checkbox').prop('checked', true);
Posted by: Guest on March-17-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
1

jquery get all checkbox checked

$('.theClass:checkbox:checked')
Posted by: Guest on July-17-2020
0

find all checkbox inside div jquery

$('#selectChb').click(function(){ 
     $(':checkbox').prop("checked", true);
});
Posted by: Guest on February-21-2021

Code answers related to "checked all checkbox jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language