I'm trying to work out how to a check a radio button of a particular
group based on it's value.

Here's the html
<input type="radio" value="2" name="gender"/>Female
<input type="radio" value="1" name="gender"/>Male
<input type="radio" value="0" name="gender"/>Not Specified


// My current code.
$(document).ready(function(){
   $("input[name='gender']??").attr('checked', true);
});

I know the value I want to set for the group, but not sure how to
access this in jquery, hence the question marks.

Reply via email to