Answers for "if this is checked jquery"

63

How to check whether a checkbox is checked in 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
}
Posted by: Guest on July-19-2019
2

jquery is checked

if ($('[name="your_input_checkbox_name"]').is(":checked"))
{
  // it is checked
} else {
  // it isn't checked	
}
Posted by: Guest on July-01-2020
0

check if checkbox is checked jquery

var $boxes = $('input[name=thename]:checked');
Posted by: Guest on February-05-2021
0

jquery check if checkbox is checked

var $boxes = $('input[name=thename]:checked');
Posted by: Guest on September-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language