Created
March 12, 2014 08:12
-
-
Save technoknol/9502804 to your computer and use it in GitHub Desktop.
Show Loader while page loads
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
<!-- | |
* Author : TechnoKnol | |
* Description : Show Loader while Page Loads Completely | |
* | |
* | |
* | |
--> | |
<!-- Add below DIV right after <body> --> | |
<div id="spinner"></div> | |
<!-- Add below code right before </head> --> | |
<!-- Include jQuery if it's not already in your <head> --> | |
<script type="text/javascript"> | |
jQuery(window).load(function() { | |
jQuery("#spinner").fadeOut("slow"); | |
}); | |
</script> | |
<!-- Add below code in your stylesheet --> | |
<!-- Put any loader in your website Directory and change name and path in style (#spinner) according to image file. --> | |
<style type="text/css"> | |
#spinner { | |
position: fixed; | |
left: 0px; | |
top: 0px; | |
width: 100%; | |
height: 100%; | |
z-index: 9999; | |
background: url('loader.gif') 50% 50% no-repeat #fff; | |
} | |
</style> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment