How to show a loading icon until the pdf file loads in an iframe
<p>I have series of PDF files links in one page.  When user clicks any of them, a new windows opens up with with header and footer and an <code>&lt;iframe&gt;</code>. Inside that IFRAME, I am loading that PDF file.</p>

<p>Now PDF file is taking time to load, I want to show a loading icon until PDF file has completed loading.</p>

<p>By using my code the browser hiding the loading icon hides the loading when the Iframe is loaded. So need your help how to determine when Pdf is ready or loaded in Iframe.</p>

<p>code</p>

<pre><code>$("#iframe").load(function(){  //Iframe is the id of Ifrmae
    $("#loadingicon").hide();  //loadingicon is id of the Loading Icon div
    $("#iframe").show();
});
</code></pre>
