I have HTML page which have multiple checkboxes and individually they can be checked. I have button for \"Select All\" and when I click on this button all the check
DEMO
Easiest way is to use following jQuery code:
//EDIT on the second click, you now remove all checked boxes.
$('#selectAll').click(function(e) {
if($(this).hasClass('checkedAll')) {
$('input').prop('checked', false);
$(this).removeClass('checkedAll');
} else {
$('input').prop('checked', true);
$(this).addClass('checkedAll');
}
});
monitoring
Name
Company
Employee Type
Address
Country
varun
TCS
IT
San Francisco
US
Rahuk
TCS
IT
San Francisco
US
johm Doe
TCS
IT
San Francisco
US
Sam
TCS
IT
San Francisco
US
Lara
TCS
IT
San Francisco
US
Jay
TCS
IT
San Francisco
US
Tom
TCS
IT
San Francisco
US