issue in jquery radio button selection

Posted by Sri on Stack Overflow See other posts from Stack Overflow or by Sri
Published on 2012-12-07T10:56:30Z Indexed on 2012/12/07 11:03 UTC
Read the original article Hit count: 172

Filed under:

I am not much more flexible with jquery. I have some li tags and for each li tag, I have one input tag of type radio like:

<li><input type='radio' value='cool' name='radiooption' id='2'>2</li>
<li class='answered'><input type='radio' name='radiooption' value='cool1' id='3'>3</li>
<li><input type='radio' value='cool' name='radiooption' id='4'>4</li>
<li><input type='radio' value='cool' name='radiooption' id='2'>5</li>

Now by jquery how to add checked="checked" for radio button which is under li tag having class='answered'?

Please guide me.

© Stack Overflow or respective owner

Related posts about jQuery