So my page is 4000+ lines and while loading, it shows all the controls in an unformatted, HTML looking, ugly thing.
To hide the ugliness, I hide the <body>, like so:
<script>
document.write('<style>body{visibility:hidden;}</style>');
jQuery(document).ready(function(){
delay();
});
function delay() {
var secs = 1;
setTimeout('initFadeIn()', secs);
}
function initFadeIn() {
jQuery("body").css("visibility","visible");
jQuery("body").css("display","none");
jQuery("body").fadeIn(200);
}
</script>
It does the job of showing the page when its ready but it can take 10+ sec. in a slow connection and the page looks blank, lifeless, dead, as if nothing is going on or something is wrong.
My question is: is there a way to show a spinner of sorts while the <body> is ready to be shown ?
If you can provide an example page in
http://code.reloado.com ( or similar ) better.
Thanks