In this jsFiddle
http://jsfiddle.net/littlesandra88/tZqYX/
would I like that a new <tr> is inserted below the one where “Details” is clicked.
I do
$('.row').append("<tr><td>It worked</td></tr>");
but this results in
<tr class="row">
<td class="edit-column"><a href="javascript:addRemove('7249');">Details</a> <input value="Save" type="submit"></td>
<tr><td>It worked</td></tr></tr>
where I was hoping for
<tr class="row">
<td class="edit-column"><a href="javascript:addRemove('7249');">Details</a> <input value="Save" type="submit"></td>
</tr>
<tr><td>It worked</td></tr>
Any idea how to fix this?
Try
$('.row').after("<tr><td>It worked</td></tr>");.append.is appending the row to the .row row. Using.afterwill put the row AFTER the .row row