Scroll to Top jQuery button for Blogger


Click on Edit HTML option in Blogger and search for  </body> tag in your template by pressing Ctrl + F. Add the below given code just above </body> and save the template. Thats it.
<style type="text/css">
#abt-Top {-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px; width:100px;background-color: #EEEEEE;background-color: rgba(238, 238, 238, 0.6);filter:
progid:DXImageTransform.Microsoft.gradient(startColorStr=&#39;#99EEEEEE&#39;,EndColorStr=&#39;#99EEEEEE&#39;);text-align:center;padding:5px;position:fixed;bottom:10px;right:10px;cursor:pointer;color:#444;text-decoration:none;border:1px solid #C9C9C9;}
</style>
<!-- Scroll to Top Plugin for Blogger by www.allbloggertricks.com-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"/>
<script type='text/javascript'>
    jQuery(function($) {
        $.fn.scrollToTop = function() {
        $(this).hide().removeAttr(&quot;href&quot;);
        if ($(window).scrollTop() != &quot;0&quot;) {
            $(this).fadeIn(&quot;slow&quot;)
        }
        var scrollDiv = $(this);
        $(window).scroll(function() {
        if ($(window).scrollTop() == &quot;0&quot;) {
        $(scrollDiv).fadeOut(&quot;slow&quot;)
        } else {
        $(scrollDiv).fadeIn(&quot;slow&quot;)
        }
    });
    $(this).click(function() {
        $(&quot;html, body&quot;).animate({
        scrollTop: 0
        }, &quot;slow&quot;)
    })
    }
});
jQuery(function($) {
    $(&quot;#abt-Top&quot;).scrollToTop();
});
</script>
<!-- Scroll to Top Plugin for Blogger by www.allbloggertricks.com-->
    <a href="#" id="abt-Top" style="display: none;">Scroll to Top </a>
Share on Google Plus

About jimdiamante

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
0 Comments
0 Comments
Comments

0 comments:

Mag-post ng isang Komento