Reputation: 9555
How do I get the the number of matches/length of: only input check boxes that are checked in the first td in a tr?
this works:
$('#myTable').find('tr td input[type=checkbox]:checked').parents('tr').length;
this wont work
$('#myTable').find('tr td:eq(0) input[type=checkbox]:checked').parents('tr').length;
Upvotes: 1
Views: 163
Reputation: 9555
$('#myTable tr').find('td:eq(0) input[type=checkbox]:checked').length;
Upvotes: 0
Reputation: 15338
try this:
$('#myTable').find('tr td:first input[type=checkbox]:checked').length;
Upvotes: 1