Append a jQuery element to a string that contains html
<p>I have a jQuery wrapped element which I would like to append to a html row. I can't wrap my head around this, since append() seemingly accepts strings but not existing jQuery elements (I might be mistaken here).
I have a following setup:</p>

<pre><code>var row='&lt;tr&gt;&lt;td&gt;data1&lt;/td&gt;&lt;td&gt;data2&lt;/td&gt;&lt;td&gt;';
var img=$('&lt;img src="path/to/img.png"');
img.click(myClickHandler);
</code></pre>

<p>Now what I'm trying to do is to append this img element to my row and 'close' the row with a closing  tag.
I'm doing it as follows:</p>

<pre><code>var jRow=$(row);
jRow.append(img);
jRow.append('&lt;/td&gt;&lt;/tr&gt;');
</code></pre>

<p>After my row is ready I append it to my table:</p>

<pre><code>$('#tableId').append(jRow);
</code></pre>

<p>Well, all above doesn't work, because I get [Object Object] instead of image tag in my added row.</p>

<p>My goal is to have a row with an image in last cell and a working click handler.</p>

<p>Pleease, help.</p>
