Reputation: 9655
I know I can use :checkbox:checked
to get a list or an array whichever you'd like to call it with all the checkboxes which are checked.
But is there a function to get an unchecked list? (like :checkbox:unchecked
which does not seem a valid function) I don't want to loop through each element using .is(":checked")
.
Thanks.
Upvotes: 1
Views: 15354
Reputation: 912
you can try this selector,
var unchecked_checkboxes = $(".checkbox").not(":checked");
i assume your checkboxes have the class "checkbox".
Upvotes: 1