Possible to append html before and after template?
<p>Is it possible to append html before and after a <a href="http://api.jquery.com/jquery.tmpl/" rel="nofollow">JQuery.tmpl</a>?</p>

<p>I would like to insert a nested table in</p>

<pre><code>&lt;table id="accTable"&gt;
  &lt;tr class="row" id="12345"&gt;
  &lt;/tr&gt;
  &lt;!-- New row to be inserted here --&gt;
&lt;/table&gt;
</code></pre>

<p>so I have done</p>

<pre><code>var dat = [];
$.each(result, function(key, value){
    dat.push({
    FROM: this.date,
    ID: key,
    });
});

var markup = "&lt;tr&gt; &lt;td&gt;${ID}&lt;/td&gt; &lt;td&gt;${FROM}&lt;/td&gt; &lt;/tr&gt;";

$.template("actTemplate", markup);

$('#'+id).tmpl("actTemplate", dat).after('#'+id);
</code></pre>

<p>But somehow I need to append <code>&lt;tr&gt;&lt;td&gt;&lt;table&gt;</code> and prepend <code>&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;</code>.</p>

<p>I have thought about adding that HTML to the existing, but it should happen in a button press, so until it is pressed would it look wrong. So I guess the append and prepend have to happen when the template is inserted...?</p>

<p>Any suggestions on how to solve this?</p>

<p><strong>Update</strong></p>

<p>In this jsFiffle will a row be added/removed when "Details" is clicked. This is the row that I would like to replace.</p>

<p><a href="http://jsfiddle.net/littlesandra88/hhMM6/" rel="nofollow">http://jsfiddle.net/littlesandra88/hhMM6/</a></p>
