Created
August 11, 2014 12:15
-
-
Save brenopolanski/d118d10c130a6597872a to your computer and use it in GitHub Desktop.
Effect of loading in page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#loading-page { | |
background: rgba(204,204,204,.8); | |
height: 100%; | |
width: 100%; | |
overflow: hidden; | |
position: fixed; | |
left: 0; | |
top: 0; | |
z-index: 99998; | |
} | |
#loading-container { | |
position: fixed; | |
top: 50%; | |
left: 50%; | |
} | |
#loading-content { | |
width: 800px; | |
text-align: center; | |
margin-top: -50px; | |
margin-left: -400px; | |
height: 100px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="loading-page"> | |
<script type="text/javascript"> | |
document.write('<div id="loading-container"><p id="loading-content">' + | |
'<img src="/img/loading.gif" alt=""></p></div>'); | |
</script> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadingPage() { | |
setTimeout(function() { | |
$('div#loading-page').fadeOut(function() { | |
$(this).remove(); | |
$('body').removeAttr('style'); | |
}); | |
}, 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment