Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #check #checkbox #checked
ADD COMMENT
Topic
Name
8+2 =