jquery checkbox checked
//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 checkbox checked
//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
}
if checkbox is checked
if ($('#id_input').is(':checked')) { }
checkbox is checked jquery
$("#out_of_stock_toggle").click(function(){
if($(this).is(':checked')){
//show oos
$(".oos").fadeIn();
}else{
//hide oos
$(".oos").fadeOut();
}
});
check whether a checkbox is checked in jQuery
if ($('#grepperRocks').is(':checked')) {
// this checkbox is checked
}
jquery check if checkbox is checked
if($('#on_or_off_checkbox').is(':checked')){
//I am checked
}
jquery is checked
if ($('[name="your_input_checkbox_name"]').is(":checked"))
{
// it is checked
} else {
// it isn't checked
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us