Do you know what the problem was? $ isn't working. I tried the same code with jQuery like
jQuery("#tblUsers tbody").append("<tr class='trHead' ><td class='tdHead'>Firstname</td>
<td class='tdHead'>Lastname</td>
<td class='tdHead'>Username</td></tr>"
);
And this is working