Putting a <tr> in the template resulted in... something weird. Adapting tricks from JQuery with additional fixes.