Hide element until page is loaded

Written by Amanda. Posted in JQuery

With some browsers or users with a slower connection a more complex element such as a photo library might load awkwardly. This sets the class to hidden and only shows when document is ready.

In the head area

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script>
jQuery( document ).ready(function( $ ) {


In the body area

  <div  id = "example" style="display:none;">