Delete new jQuery prepended node after 2 seconds
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5950318/getting-jquery-inserted-dom-elements-without-requerying-for-element-after-insert">Getting jQuery-inserted DOM elements without requerying for element after insertion</a>  </p>
</blockquote>



<p>Is there a way to store a newly prepended element (with jQuery) into a var?</p>

<p>I want to do something like this:</p>

<pre><code>var new_div = $('#my-div').prepend('&lt;div&gt;Something new&lt;/div&gt;');

setTimeout(function () {
    new_div.remove();
}, 2000);
</code></pre>
