So it's important to use
You need to use
<! --jQuery Plugin-- >
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
Place the following JavaScript code right before the </body> tag.
<! --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(350).fadeOut('slow'); // will fade out the white DIV that covers the website.
$('body').delay(350).css({'overflow':'visible'});
})
//]]>
</script >
CSS
Need to use the below CSS code in your template. You can customize the CSS easily.
{ body
: hidden; overflow
}
/* Preloader */
#preloader {
: fixed; position
: 0; top
: 0; left
: 0; right
: 0; bottom
-color: #fff; background
/* change if the mask should have another color then white */
-index: 99; z
/* makes sure it stays on top */
}
#status {
: 200px; width
: 200px; height
: absolute; position
: 50%; left
/* centers the loading animation horizontallythe screen */ one
: 50%; top
/* centers the loading animation verticallyone the screen */
background -image: url( .. /img /status.gif);
/* path to your loading animation */
background -repeat: no-repeat;
background -position: center;
margin : -100px 0 0 -100px;
/* is width and height divided by two */
}
HTML
Place following HTML Code directly after the <body> tag.
<! --Preloader -- >
<div id="preloader ">
<div id="status"> </div>
</div>
The outer DIV '
Image
The image status.gif is will be displayed in the DIV status and is located at /
Donwload the preloader source code
For more Tutorials keep visiting our Blog.
Share it in your Facebook, Twitter, Google Plus wall.
Thanks.
