I need to reach the the span tag with class = ustatus
and have the jQuery object obtained for id = foo
.
<tr>
<td> <input name = 'user' type='radio 'id='foo'/> </td>
<td> <input id='boo'/> </td>
<td> <input id='too'/> </td>
<td> <input id='yoo'/> </td>
<td> <span class='ustatus'> Active </span> </td>
</tr>
I was trying like:
$("input[name = 'user']:checked").closest('td').find('.ustatus').first().val()
but get undefined
as the value. Where did I make a mistake?