Reset all checkboxes on page without looping



I was wondering if it was possible to reset all the checkboxes (mark them unchecked) on the page without looping using jQuery?





You can use a single selector to find all the checked checkboxes, and remove the ‘checked’ attribute from them. jQuery will do this internally by looping, but you will not have to write a loop yourself:


See the :checkbox and :checked selectors.


Facebook Comments

Post a comment