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
Post a Comment