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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -