get checkbox jquery code example
Example 1: jquery check checkbox
$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);
Example 2: jquery checkbox checked value
if ($('#check_id').is(":checked"))
{
// it is checked
}
Example 3: check a checkbox jquery
$('#grepperRocks').prop('checked', true);
Example 4: jquery get selected checkboxes
var selected = [];
$('#checkboxes input:checked').each(function() {
selected.push($(this).attr('name'));
});
Example 5: get the value of a checkbox jquery
$("input[type='checkbox']").val();
$('#check_id').val();