Inserting table rows - fails in IE

Inserting table rows - fails in IE

I am using what I thought was a fairly standard way to add table rows. Generated a string - and then

$("#table1 tr:last").after(totalString)

However, in IE7 this completely fails and in IE8 it appends to the top of the page. You can see this here:


Any ideas?