[jQuery] Change the content of a cell from another cell
- by robs
hey,
i'm trying to select change the content of a cell with jquery but i cant seem to get it working. lets say we have this table:
<table border="1">
<tr>
<td>cell 1
<td>cell 2
<td>cell 3
<tr>
<td>cell 4
<td>cell 5
<td>cell 6 <a onclick="javascript:$(this).parent().parent().('td').html('test');">Click</a>
<tr>
<td>cell 7
<td>cell 8
<td>cell 9
</table>
i want to change the content of cell 4 from within cell 6. the ('td') obviously isnt working. how can i access cell 4 from cell 6 without the use of classes or ids?
thanks in advance