Here's the general structure of my HTML:
<html>
<table>
<form>
<tr>
<td>
<div class='radio'>
<input type='radio' name='radio' class='styled'>
</div>
</td>
<td></td>
<td></td>
<td class="num"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>
<div class='radio'>
<input type='radio' name='radio' class='styled'>
</div>
</td>
<td></td>
<td></td>
<td class="num"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>
<div class='radio'>
<input type='radio' name='radio' class='styled'>
</div>
</td>
<td></td>
<td></td>
<td class="num"></td>
<td></td>
<td></td>
<td></td>
</tr>
</form>
</table>
</html>
I am trying to get the value of .num for the row that has a radio button selected.
Here's my amateurish attempt at jQuery:
$(document).ready(function() {
$('input:radio[name=radio]:checked').parent().sibling('.num').val();
});
Please help!

New Topic/Question
Reply



MultiQuote




|