jeffhodgeson
asked on
Get selected value of RadioButtonList using JQuery
The function below works fine. But I was curious as to how to use 'this' with the input:checked selector to find the value of the checked button. I've tried different formats but haven't hit on the right one. i.e. $('this input:checked').val()
$(function () {
$('#<%=rblExistingDamage.ClientID%>').click(function () {
if ($('#<%=rblExistingDamage.ClientID%> input:checked').val() == 'true') {
$('#<%=rowExistingDamage.ClientID%>').show();
} else {
$('#<%=rowExistingDamage.ClientID%>').hide();
}
});
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, just what I was looking for.
you're welcome
Open in new window
by :Open in new window