I want to count how many checkboxes on my page are selected using jQuery. I\'ve written the following code:
var numberOfCheckboxesSelected = 0;
Try this(to avoid counting any selected radio buttons):
var numberOfCheckboxesSelected = $('input[type=checkbox]:checked').length;