August 13, 2011

How To Add jQuery Scroll To Top Button To Blogger

Hey! here is the beautiful jquery code for you :) this posts i'm gonna show you how to add scroll to top (back to top) button using jquery. this tute hava the 8 steps we are ready! let's go! thank you for visiting my blog!

Now Follow the simple steps below to do it:

1.Login to your blogger dashboard--> Desing- -> Edit HTML

2.Scroll down to where you see </head> tag .

3.Copy below code and paste it just before the </head> tag

<script src='' type='text/javascript'/>

<script type='text/javascript'>


$('a[href*=#top]').click(function() {

if (location.pathname.replace(/^//,'') == this.pathname.replace(/^//,'')
&& location.hostname == this.hostname) {

var $target = $(this.hash);

$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');

if ($target.length) {

var targetOffset = $target.offset().top;

$('html,body').animate({scrollTop: targetOffset}, 1000);

return false;




<!-- end scrolltop -->

4.Now scroll down where you see <body> tag

5.Replace <body> tag with <body id='top'> 

6.Now again scroll down where you see </body> tag

7.Copy below code and paste it just before </body> tag

<div id='goingtop'>
<a href='#top' title='Go Top'><img src='' style='right:20px; bottom:20px; position: fixed;'/></a></div>

8.Click on save template and you are done.

Picture From

No comments:

Post a Comment