How to Remove a iframe by jQuery
<p>I create a <code>iframe</code> in a <code>div</code> by jQuery.Then I load another page(lets say page A.jsp) into that iframe. The page 'A.jsp' has some functionality and end of it, the parent iframe should be removed from the first page when a button in 'A.jsp' is pressed .  Loading the page 'A.jsp' into the iframe is OK. but I can't remove the parent iframe. How I tried was, select the parent tag <code>iframe</code> then, remove it. but it didn't work. Here is how I tried.Here $(this) referes to a button in page A.jsp and &amp;('div iframe')referes to the parent iframe   </p>

<pre><code>$(this).closest($('div iframe')) .animate({
                                   opacity:0
                               },500,function(){$(this).remove()})
</code></pre>

<p>How can I remove the parent iframe ?</p>
