Select All checkboxes using jQuery

Today, We want to share with you Select All checkboxes using jQuery.In this post we will show you Select / Deselect all checkboxes using jQuery, hear for select multiple rows with checkboxes using jquery we will give you demo and example for implement.In this post, we will learn about how to check all checkbox is selected in jquery with an example.

Select All checkboxes using jQuery

There are the Following The simple About Select All checkboxes using jQuery Full Information With Example and source code.

As I will cover this Post with live Working example to develop jquery select all checkboxes in table, so the select all checkbox jquery datatable for this example is following below.

include the jQuery library


Step 1: jQuery Code


$(document).ready(function(){
    $('#check_all').on('click',function(){
        if(this.checked){
            $('.liveitem').each(function(){
                this.checked = true;
            });
        }else{
             $('.liveitem').each(function(){
                this.checked = false;
            });
        }
    });
    
    $('.liveitem').on('click',function(){
        if($('.liveitem:checked').length == $('.liveitem').length){
            $('#check_all').prop('checked',true);
        }else{
            $('#check_all').prop('checked',false);
        }
    });
});


Step 2: HTML Code


  • Check all
    • product 1
    • product 2
    • product 3
    • product 4
    • product 5
Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Select All checkboxes using jQuery.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment