Posted inTechnology / JavaScript / jQuery / Programming

Select / Deselect all checkboxes using jQuery

Today, We want to share with you Select / Deselect all checkboxes using jQuery.In this post we will show you select all checkbox jquery datatable, hear for jquery uncheck all checkboxes except current one we will give you demo and example for implement.In this post, we will learn about jquery uncheck all checkboxes with same name with an example.

Select / Deselect all checkboxes using jQuery

There are the Following The simple About jquery uncheck all checkboxes with same name Full Information With Example and source code.

As I will cover this Post with live Working example to develop how to uncheck select all checkbox when one checkbox is unchecked, so the some major files and Directory structures for this example is following below.

Step 1: Include jQuery library

At first we need to include jQuery Latest library file.


Step 2: JavaScript/jQuery Source Code:

This file All the Data contains the following JavaScript/jQuery Source codes.

$(document).ready(function(){
$('#check_all_checkbox').on('click',function(){
if(this.checked){
$('.checkbox').each(function(){
this.checked = true;
});
}else{
$('.checkbox').each(function(){
this.checked = false;
});
}
});

$('.checkbox').on('click',function(){
if($('.checkbox:checked').length == $('.checkbox').length){
$('#check_all_checkbox').prop('checked',true);
}else{
$('#check_all_checkbox').prop('checked',false);
}
});
});

Step 3: HTML Source Code:

This file contains the following HTML Markup Source codes.

  • Select all
    • Item 1
    • Item 2
    • Item 3
    • Item 4
    • Item 5
 

Step 4: CSS Source Code

Following CSS Source codes are used for Multiple Checkbox Select/Deselect using jQuery.

.main{
height: 200px;
background: #aaa;
}
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 uncheck all checkboxes jquery in div & select all checkbox jquery datatable.
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.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype