I need to check the checked property of a checkbox and perform the action based on the checked property using jQuery.
For example, if the age checkbox is checked, then I need to show a textbox to enter age, else hide the textbox.
But the following code gives false as by default:
if ($('#isAgeSelected').attr('checked')) {
$("#txtAge").show();
}
else
{
$("#txtAge").hide();
}
Did I miss anything here?