Archive · October 3, 2010

jquery hide content (div, span, class, id) until page loaded / document.ready

found the solution here: http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content basically, you can hide whatever element you need to. in this example, i'm hiding the class ".alert_news" which is an alert box asking the user if they want to delete something. <!--hide stuff --> <style type="text/css"> .js .alert_news {display: none;} </style> <script type="text/javascript"> $('html').addClass('js'); $(document).ready(function() { // Stuff to do as soon as the DOM is ready }); </script>