I’ve got this:
$(".TempAddLineItem").live('click', function() {
var $this = $(this);
$(this).closest("tr").append("<tr><td>row creating</td></tr>");
//$(this).append("<tr><td>row creating</td></tr>");
$this.prev('.AddLineItem').click();
return false;
});
The issue Im having is it appears to append to a <td> rather then a <tr> that is
in my asp.net gridview, after the append it looks like it adds a column rather then a row ???
append() indeed inserts content inside the element. You’re looking for after():
EDIT: If you want to get a reference to the new table row, you can invert the logic and use insertAfter():