Home » » Fade In/Out Page Loading Effect On Blogger Posts

Fade In/Out Page Loading Effect On Blogger Posts

Written By Unknown on Monday 2 September 2013 | 00:24

A very common effect in jQuery is the fade effect that hide or shows an element by fading it, we can use it in many ways







How to use The Fade in Loading Effect:

Step 1: To put this fading effect on your blog, go to your Template > Edit HTML


Step 2: Click anywhere inside the code area and search for the </head> tag using CTRL + F keys:


Step 3: Then just above </head> add the following code:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$("body").css("z-index", "-10");
$("body").fadeIn(0);

$("a").click(function(event){
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(500, redirectPage); });
function redirectPage() {
window.location = linkLocation;
}
});
//]]>
</script>
<style>
html {
background-color: #F2F2F2; /* Color fading */
}
</style>



Step 4: Save the changes and here you go. In RED you can see where to change the color that fades on a loading page. 

The original script hides the body of the page while loading, I prefer to change that property with a  negative, z-index to avoid problems with the search engine robots that may effect the positioning.

Share this article :

Post a Comment

Featured Posts

Most Read

Catagory

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2013. 4 Blogging Tips - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger