Thursday, 26 September 2013

Animated Page Loading Effect for Blogger



Every blogger wants his blog to look best among his competitor’s blogs. This widget will add a bit more chunks of awesomeness in your blog.

The concept of this widget is simple. This is more or less like Exit Effect we add in Microsoft PowerPoint’s Custom Animation. Just like that whenever the visitors will click any link to leave the current page, inspire of the old boring loading it will have animation.


A live demo can be seen on my blog itself. Just click any link here and you could see the change.

To add this effect to your blog does the following things.

Adding the HTML and Script

Add the below given code just above </body>.
<style>
#abt-page-loader {
        position: fixed!important;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 9999;
        background:#000 url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgttAprbB_I9qv1xItU5zZrTZZDTKjXLRToxXnoBLu5kTJJdjdwZF_WROctVlS2dyUhoYKcCzFQU3LsuRH3PoMx7fBbZYyw4pFwUlVBdDnl21GHe4roessjJ3XwaWQTZeVNm1-YxuByVzY/s200/load6.gif') no-repeat 50% 30%;
        color: #FFF;
        display: none;
        font: 0/0 a;
        text-shadow: none;
        padding: 1em 1.2em;
}
</style>
<script type='text/javascript'>
//<![CDATA[
$(document.body).append('<div id="abt-page-loader">Loading...</div>');
$(window).on("beforeunload", function() {
    // ... Show the Animation `.fadeIn()`
    $('#abt-page-loader').fadeIn(1000).delay(6000).fadeOut(1000);
});
//]]>
</script>

After adding this code, save the template

You are done now. Now you and your visitors can see this awesome and cool Animated Page Loading Effect in you blogger blog.

No comments:

Post a Comment