Skip to content

Instantly share code, notes, and snippets.

@danielthall
Created October 30, 2013 16:50
Show Gist options
  • Save danielthall/7236037 to your computer and use it in GitHub Desktop.
Save danielthall/7236037 to your computer and use it in GitHub Desktop.
Simple Preloader
<!-- Preloader -->
<div id="preloader">
<div id="status">&nbsp;</div>
</div>
<!-- Preloader -->
<script type="text/javascript">
//<![CDATA[
$(window).load(function() { // makes sure the whole site is loaded
$("#status").fadeOut(); // will first fade out the loading animation
$("#preloader").delay(40).fadeOut("fast"); // will fade out the white DIV that covers the website.
})
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment