E.g. Checkboxes are defined using . The reason for writing this post is because I have seen many beginner programmers using val () == '', which is wrong as val () is a method that takes argument. < html lang ="en"> < head > < title > Select and deselect all checkboxes using jquery < script src ="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"> < body > The advantage of this solution is if you have on change events or on click events tied to the checkbox this will make them happen. $('#divListBox')... If you are looking for a quick jQuery snippet that toggles multiple check-boxes checked status simply by clicking "Select All" checkbox (like in Gmail and many other web applications), here's are few examples that might be useful for your HTML form. This should work: $('#divListBox :checked').removeAttr('checked'); W3Schools offers free online tutorials, references and exercises in all the major languages of the web. If the total number of checkboxes equals the number of checked checkboxes then set Check all checkbox checked otherwise, unchecked. Here, we are setting up the event listener to listen for the change event of the checkboxes with the class checkme . Otherwise, it’s set to black. We have used this form already in a previous tutorial which is for getting checked items from a group of checkboxes. The above form will trigger jQuery function on clicking the header checkbox next to the Check All label. jQuery function will check whether the header checkbox is checked or unchecked. How to uncheck all other checkboxes apart from one using jQuery Count the total number of checkboxes and checked checkboxes. In this tutorial, we are going to see how to check or uncheck group of checkboxes using jQuery. View Demo Download I had to uncheck all checkboxes at once. How to clear textbox value using jQuery | Learning jQuery