To return the number of checked or ticked checkboxes on a page using jQuery is in actual fact pretty simple.
By making use of the special :checked selector and combining it with the standard length property, you code snippet to retrieve the number of checked checkboxes on a page looks like this:
Similarly, if you wanted to locate all the checked checkboxes based on a specific selector grouping, you would make use of the .filter function and combine it with those we used above. So your code would now look as follows:
Note, if you wanted to run the same code above but only pick up on unchecked checkboxes, you could run: