How to add a new tr into a table with dynamic content?

How to add a new tr into a table with dynamic content?

Hi,

I'm looking for a way to add a new <tr> after an existing one to show
detail information. Right now I'm doing this via the "insertAfter/remove"
function:
$("<tr class='detailcontent'><td>content...</td></tr>").insertAfter($(this).parent().parent());

This method works so far but I need the whole function dynamically. That
means I have to load content depending in the given id-parameter. Any
idea how to relize this or a link to a tutorial?

thx
T.C.