I need to check the checked property of a checkbox and perform an action based on the checked property using jQuery.
checked
For example, if the age checkbox is
There are many ways to check if a checkbox is checked or not:
Way to check using jQuery
if (elem.checked) if ($(elem).prop("checked")) if ($(elem).is(":checked")) if ($(elem).attr('checked'))
Check example or also document:
http://api.jquery.com/attr/
http://api.jquery.com/prop/