How To Count Selected Checkboxes Using jQuery

Just be sure to add the class “yourClass” to each checkbox in the group you wish to count and it is as simple as:
1 |
alert( 'Qty checked: ' + jQuery('.yourClass:checked').length ); |
![]() |
Just be sure to add the class “yourClass” to each checkbox in the group you wish to count and it is as simple as:
1 |
alert( 'Qty checked: ' + jQuery('.yourClass:checked').length ); |