Jquery checkbox checked select all

selecting checked checkbox in jQuery

jQuery(':checked')
The :checked selector works for checkboxes and radio buttons. For select elements, use the :selected selector.

Getting all selected checkboxes in an array.
jQuery get the checked and unchecked items from list of check box.
<input name="type" type="checkbox" value="1" />
<input name="type" type="checkbox" value="2" />
<input name="type" type="checkbox" value="3" />
<input name="type" type="checkbox" value="4" />

var selected = new Array();
$("input:checkbox[name=type]:checked").each(function()
{
    // add $(this).val() to your array
    selected.push($(this).val());
});

All the checkboxes are contained within a div with in id
Demo
Select all with jquery in asp.net
Jquery checkbox checked select all Jquery checkbox checked select all Reviewed by Bhaumik Patel on 8:49 AM Rating: 5