checkbox is checked jquery
//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
}$(your_checkbox).is(':checked');$("checkbox").is(":checked")$('#' + id).is(":checked")// Check a checkbox
$(selector).prop('checked', true);
// Un-check a checkbox
$(selector).prop('checked', false);
// Determine if checked or not
isChecked = $(selector).prop('checked');if ($('#grepperRocks').is(':checked')) {
// this checkbox is checked
}
Also in JavaScript:
- are you sure javascript
- toggle jquery remove others
- owl responsive
- display array in div javascript
- react native setstate object
- delete package-lock.json command
- flatlist like in reactjs
- javascript switch assignment
- javascript assign value to input using name
- dimensions react native
- how to run nextjs in another port
- add firebase javascript
- change input placeholder text jquery
- jquery validator Url
- how to solve Could not write JSON: Infinite recursion (StackOverflowError)
- jsx babel webpack
- node js read files recursively
- how to add onclick event in javascript
- javascript swap images on mouseover
- jquery loop through each child element
- jquery onload event
- constructor react
- cJSON_CreateObject
- mocha test cases in node js example