jQuery count the number of checked checkboxes

Sam Deering
Share

Simple jQuery code snippet to count the number of checkboxes checked in a table.

$('#table :input[type="checkbox"]:checked').length