How do you access the DOM node in jquery inside of a javascript variable?
<p>I have the following html</p>

<pre><code>&lt;div id="list_item_template"&gt;&lt;li&gt;&lt;a href="#"&gt;Text&lt;/a&gt;&lt;/li&gt;&lt;/div&gt;
</code></pre>

<p>and javascript:</p>

<pre><code>var item = $("#list_item_template").clone();
</code></pre>

<p>What I want to do is access the inner <code>&lt;a&gt;</code> tag of the cloned copy and add an attribute.  Without cloning I would just do:</p>

<pre><code>$("#list_item_template a").attr("onclick", "SomeFunction()");
</code></pre>

<p>However, I need to perform that operation on the cloned copy, not on the html currently on the page.  How would I do this?</p>
