almost 9 years ago
If you would like to implement Select All/UnSelect check-boxes with jquery please follow the below code::
<table class="demo-table"> <tr><td><input type="checkbox" name="selectall" id="selectall">Select All</td></tr> <tr><td><input type="checkbox" name="select[]" class="ab" value="1"></td></tr> <tr><td><input type="checkbox" name="select[]" class="ab" value="2"></td></tr> <tr><td><input type="checkbox" name="select[]" class="ab" value="3"></td></tr> </table> <script> $(document).ready(function () { $("#selectall").change(function () { if(this.checked){ $('.ab').each(function(){ this.checked = true; }) }else{ $('.ab').each(function(){ this.checked = false; }) } }); }); </script>
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)