Append new row in table

Append new row in table after an ID


var tr = '<tr style="display:none:width:100%" >';
tr += '<td align="left" bgcolor="#FFFFFF" class="product_name">'+sku+'</td>';
tr += '<td align="left" bgcolor="#FFFFFF">'+productname+'</td>';
tr += '<td align="left" bgcolor="#FFFFFF"><input class="ed_pro_input quantity" style="width:100px" type="text" id="quantity" alt="'+productId+'" name="quantity['+productId+']" value="1"></td>';
tr += '<td align="left" bgcolor="#FFFFFF"><input class="ed_pro_input cost" style="width:100px" type="text" id="cost" alt="'+productId+'" name="cost['+productId+']" value="'+cost+'"></td>';
tr += '<td align="center" bgcolor="#FFFFFF"><span class="delete" onclick=" javascript:return confirm(\'Are you sure! You want to delete\');"><img src="../images/del.gif" border="0" /> </span></td>';
tr += '</tr>';
$(tr).insertBefore('#last_tr');