check if checkbox is checked jquery
snippet in javascript

check if checkbox is checked jquery

user1343

//using plane javascript 
if(document.getElementById('on_or_off_checkbox').checked) {
    //I am checked
} 

//using jQuery
if($('#on_or_off_checkbox').is(':checked')){
    //I am checked
}

jquery if checkbox checked

user1762

$( "SELECTOR" ).attr( "checked" )  // Returns ‘true’ if present on the element, returns undefined if not present
$( "SELECTOR" ).prop( "checked" ) // Returns true if checked, false if unchecked.
$( "SELECTOR" ).is( ":checked" ) // Returns true if checked, false if unchecked.

How do I check whether a checkbox is checked in jQuery?

user5432

$('#' + id).is(":checked")

jquery in checkbox checked

user4973

// Check a checkbox
$(selector).prop('checked', true);
// Un-check a checkbox
$(selector).prop('checked', false);
// Determine if checked or not
isChecked = $(selector).prop('checked');

check whether a checkbox is checked in jQuery

user1872

if ($('#grepperRocks').is(':checked')) {
	// this checkbox is checked
}

check if checkbox is checked jquery

user533

var $boxes = $('input[name=thename]:checked');