Skip to content

Instantly share code, notes, and snippets.

@brandanmajeske
Created February 13, 2014 17:41
Show Gist options
  • Save brandanmajeske/8980079 to your computer and use it in GitHub Desktop.
Save brandanmajeske/8980079 to your computer and use it in GitHub Desktop.
A Pen by Brandan Majeske.
<html>
<body>
<div class="overlay"></div>
</body>
</html>
(function(){
var viewportHeight = $(window).height(),
overlay = $('.overlay');
overlay.css({'height': viewportHeight});
$(window).bind("load", function() {
setTimeout(function(){
$(overlay).fadeTo( "slow", 0, function(){
overlay.remove();
});
}, 1200);
});
}());
.overlay {
position: fixed;
display: block;
top: 0;
left: 0;
width: 100%;
height: 0;
z-index: 1000;
background-color: black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment