lundi 1 juillet 2019

How to get Checked check boxes length

Trying to get checked check boxes length but getting 0 while they are all checked.

I have a table and it's row's containing td's of check boxes. Each input type checkbox has class name " check ".

Having master checkbox outside the table and that is responsible for select/Deselect all check boxes inside the table.

Now I want to see if at least one check box is checked by clicking button.

var allCheckBoxes = $('.check :checkbox:checked');
console.log(allCheckBoxes.length);

It's getting nothing but zero :(




Aucun commentaire:

Enregistrer un commentaire