Check if checkbox is checked

If you want to check if your checkbox with ID defined as option_2 is checked, you can use next code: if ( $(‘#option_2’).attr(‘checked’) ) { alert(‘Yep, your checkbox is checkd’); } else { alert(‘Nope, your checkbox is not checked’); } Also, if you want to set some of your checkboxes as checked, you can do:…