javascript - Unstyled text flashes before page fully loads in Firefox -


i have web page loads inside of jquery ui dialog. when page loads in firefox, plain text appears second before css , javascript runs. once loads, text appears properly. there way prevent text showing until css/javascript runs? have tried turning on , off visibility did not work correctly.

this seems happen in firefox, , not in other browsers.

create class hides elements. add class elements want hide initially. remove class after you've run javascript want executed. following should you.

.js-needed  {     display: none; } //add line after you've run code want executed $(".js-needed").each(function() { $(this).removeclass(".js-needed"); } );  <div class="js-needed">stuff hide initially</div> 

Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -