A table contains several rows, each with four cells.
In a cell with id=tdJane
, I already have two input elements:
<table>
<tr>
<td id="tdBob">
<input type="hidden" id="hida" value="some stuff">
<input type="hidden" id="hidb" value="other stuff">
<td>
<td id="tdJane">
<input type="hidden" id="hid1" value="some text">
<input type="hidden" id="hid2" value="other text">
<td>
</tr>
</table>
Into cell #tdJane
, I wish to insert a new hidden input field below #hid2
I tried this:
$('#tdJane').html('<input type="hidden" id="hid3" value="newest text">')
but that overwrites the existing contents of the cell.
How can I do it?