jQuery Check Checkbox: Select / Deselect All checkboxes

Learn how to select or deselect all checkboxes using jQuery. This is a short and easy to use jquery code that checks all checkbox on one click.

Check or uncheck checkboxes feature is generally used to select multiple records to update or delete action.

jQuery Check Uncheck Checkbox Example:

First creating an HTML layout to show the group checkbox list.

In this, we have to call the jquery function toggleCheckbox() via onclick event.

jQuery Select All Checkboxes Script

On this toggleCheckbox() jquery function call, it will check whether the top Select ALL checkbox is checked or not.

Based on the status of top checkbox, the jquery script will iterate the group checkboxes by name and update their status.

Output:

jquery check all checkbox

Check DEMO

Recommended Posts For You

About Harish

I am professional web developer and blogger. Use this blog to share own api and other web development experience with you. I do accept paid work. Write to me at - [email protected]

View all posts by Harish