I need to check the checked
property of a checkbox and perform an action based on the checked property using jQuery.
For example, if the age checkbox is
I ran in to the exact same issue. I have an ASP.NET checkbox
In the jQuery code I used the following selector to check if the checkbox was checked or not, and it seems to work like a charm.
if ($("'.cssChkBox1 input[type=checkbox]'").is(':checked'))
{ ... } else { ... }
I'm sure you can also use the ID instead of the CssClass,
if ($("'#cssChkBox1 input[type=checkbox]'").is(':checked'))
{ ... } else { ... }
I hope this helps you.