checkall is the id of allcheck box and cb-child is the name of each checkboxes that will be checked and unchecked depend on checkall click event, in SSR's answer and its working perfect Thank you. i know there are lot of answer posted here but i would like to post this for optimization of code and we can use it globally. It is very useful when need to perform the same action on the large list of records. How can I remove a specific item from an array? The above form will trigger jQuery function on clicking the header checkbox next to the Check All label. Better user experience while having a small amount of content to show, What language(s) implements function return value by assigning to the function name. How to check whether a string contains a substring in JavaScript? jQuery provides the attr( ) and prop() methods to accomplish the task. To check the checkbox property of an element, the prop () method is recommended: $ ('#checkbox' ).prop ( 'checked' ); // Boolean true. Adding a select all checkbox in the SQLFORM.grid table header. When any of the checkbox in the column is unchecked, the Select All checkbox will get unchecked automatically. When the button is clicked, jQuery finds all the checkboxes with class name “chk” using input:checkbox[class=chk] selector and then the Id, value and state of the all HTML input checkboxes are displayed in alert using jQuery. Insert a group of checkboxes into a container with the CSS class of js-check-all-target. When checkbox with #select_all id is clicked, we will check whether it is checked or not. Here the checkboxes have parent child relationship thus you have give as traversing.If suppose the two checkboxes do not have parentchild relationship and are two different checkboxes with different class name and Id then how can we give the click function? There is one more checkbox in header, when check this checkbox all visible records will be selected/checked and unchecked. As I will cover this Post with live Working example to develop uncheck all checkbox jquery by class name, so the jquery uncheck all checkboxes with same name is used for this example is following below. ... check all checkbox jquery and get values in php; ... get the value of check box with a class in jquery; jquery check a values of checkbox; First I tried to use attr and after that I tried with prop but I'm doing something wrong. generating lists of integers with constraint. Click the checkbox given above or click each checkbox. We will show all selected checkboxes using PHP as well. The check and uncheck all functionality basically is seen where the large list of records are available. Yet another lightweight jQuery Check All jQuery plugin which enables a checkbox to select and deselect all related checkboxes with one click. Select/Deselect All Checkboxes Using jQuery - checkbox_all. Did "Antifa in Portland" issue an "anonymous tip" in Nov that John E. Sullivan be “locked out” of their circles because he is "agent provocateur"?