Javascript – sIFR not showing until all javascript has executed

iframejavascriptsifr

I am using sIFR on a page which I am loading into an iframe, and using a javascript in the parent window which constantly polls the iframe to see when it changes height (ie. when you click a link in the iframe page and it has a different height than the previous page). Anyways, the problem is that sIFR doesn't seem to show the rendered text until the entire page/script has executed so when the page is first loaded and the javascript is waiting for the iframe to change height, there is no text. As soon as the iframe changes height however (ie. I click a link within the iframe), the javascript finishes and the sIFR rendered text shows up. Is there a way to allow sIFR to render before the page/scripts have finished running?

Best Answer

Put you sifr js and css first of all in <head> before other css and js files