how to delete element created with jquery?
<p>i have write this block of code in jquery to create three element after some events </p>

<pre><code>$('body').append(
tmp= $('&lt;div id="tmp"&gt;&lt;/div&gt;')
);

$('&lt;div id="close" /&gt;').appendTo("#tmp");   
$('&lt;div id="box-results" /&gt;').appendTo('#tmp');
</code></pre>

<p>this three elements are created normally and added to my DOM but i want to remove them with some function like this : </p>

<pre><code>$("#close").click(function(e){

e.preventDefault();
$("#tmp").remove(); 
//$("#overlay").remove(); 
});
</code></pre>

<p>and after i click close div noting happen ! what's wrong with my code ? </p>

<p>here is online example : <a href="http://mymagazine.ir/index.php/main/detail/36" rel="nofollow">mymagazine.ir/index.php/main/detail/36</a> - please find " here is jquery issue" sentence in site because site language is Persian </p>
