What combination of selectors could I use to get the html text that contains
Price information in the example below. (Assume user has clicked a radio button and the Submit button)
<table border="1" id="modal_table">
<tbody>
<tr>
<td> <input type="radio" name='sub' value="509"/> </td>
<td> 509 </td>
<td class='price'> Price is $99 </td>
</tr>
<tr>
<td> <input type="radio" value="510"/> </td>
<td> 510 </td>
<td id="price"> Price is $88 </td>
</tr>
</table>
<input type='button' id='idButton2' value="Submit">
something like
myPrice = $('input[name=sub]:checked > td').html();
alert myPrice;
- get content of td cell that follows the checked radio button, or
- get content of td cell identified by id=price that follows the checked radio button