Thank you Dan, i'll try your suggestion. Although i think that the way you construct it will have people without javascript not see the content but that's easily corrected :)
-----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G. Switzer, II Sent: mercredi 23 mai 2007 14:09 To: jquery-en@googlegroups.com Subject: [jQuery] Re: improving page apparition Alexandre, >i have a page quite heavy in content: it's a summary page in a CMS, so i >cannot really reduce anymore the dom (like splitting or paging content), so >i would like to introduce some page transition, like a "loading" screen, >for instance, or an intermediary screen giving some kind of smoother feel >to the user experience. Here is my question: what would be the best way >to hide the page with a "loading" screen until the dom is fully loaded and >rendered by the browser? The easiest way is to do something like: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> window.onload = function (){ // hide the loading message $("#loading").hide(); // show the real page content $("#mainContent").show(); } </script> </head> <body> <div id="loading">Loading....</div> <div id="mainContent" style="display: none;"> .......... The rest of you page goes here .......... </div> </body> </html> I used the onload event just because you said you wanted the *fully* loaded (which I assumed you meant images.) If you don't care about images being loaded, you can use $(document).ready() instead. -Dan Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.467 / Base de données virus: 269.7.6/815 - Date: 22/05/2007 15:49