Skip to content

Instantly share code, notes, and snippets.

@fnnzzz
Forked from agragregra/jQuery Page Preload
Last active August 29, 2015 14:16
Show Gist options
  • Save fnnzzz/4d37d6fe04d89b2b12f0 to your computer and use it in GitHub Desktop.
Save fnnzzz/4d37d6fe04d89b2b12f0 to your computer and use it in GitHub Desktop.
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
}
#loaderInner {
background-image: url("../img/load.gif");
background-repeat: no-repeat;
background-posirion: center center;
background-color: #fff;
height: 60px;
width: 60px;
margin-top: -30px;
margin-left: -30px;
left: 50%;
top: 50%;
position: absolute;
}
$(window).load(function() {
$("#loaderInner").fadeOut();
$("#loader").delay(400).fadeOut("slow");
});
<div id="loader">
<div id="loaderInner"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment