At first What is Scroll to Top Button?
Scroll to top button is the link that scroll the page automatically to top part when it is clicked.
You can see the demo at this page.Click it once you will notice that you are sent back to top part of Blog.You can added the button similar to mine.Just you need to add some code in your HTML.If you have a long page the reader will have easy to get top part of Blog.Scroll to Top Button is also know as back to Top Button.Lets do it.
Adding Scroll to top button
- Go to Blogger.com
- Click on design or template then go to Edit HTML
- Find
</body>
and add this code just after it. - If you want to use image for Scroll to Top button then add this
<!-- scroll to top button end --> <a href='#' id='br-scrolltotop'><img alt='Scroll to top' src='Image-URl'/></a> <!-- Bloggerrounder.blogspot.com --> <!-- scroll to top button end -->
ReplaceImage-URl
in line 2 with the direct link of Scroll to top Image -
If you want to use text for Scroll to Top button then add this.
<a id="br-scrolltotop" href="#" title="Click to go to top">Scroll To Top</a>
You can change Scroll to Top with your Choice.
Making Scroll to Top Button Float.
- To make Scroll to top button float we need to add simple CSS.To make easy I have added it with steps.
- Find
]]></b:skin>
and add the following code just above it.#br-scrolltotop { position:fixed; bottom:5px; right:5px; }
- You can change right to left in line 4 to make it float left.
Adding Animated effect on Scroll to Top Button.
To add animated affect in Scroll to Top Button add the following code just above </head>
tag(In Template HTML editor)
<!-- Adding Animated Effect Scroll To Top Button--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script> <script language="javascript"> $(window).ready(function(){ $('#br-scrolltotop').click(function(e){ e.preventDefault(); $('html, body').animate({scrollTop:0}, 'slow'); }); }); </script> <!-- bloggerrounder.blogspot.com -->
If you have any problem please comment.Bye
Subscribe for free
Thanks for visiting Blogger Rounder.We can subscribe to Blogger Rounder's by RSS feed or email updates.
4 comments on "Add A Floating Scroll To Top Button.":
Awesome Post Thanks for adding animated affect.
Thanks for it.God bless you
Bye! See you later
nice!
Post a Comment
We Love To Hear Comments from You.Comments are Welcome.You can comment here regarding this Post.If it is not related with the post you can ask a question by Contacting Us.Before Comment Please Subscribe To our RSS or email updates.Publishing Spam Comment is Not allowed.If you want to Add Code then Please Encode it.
Simple Tags like <a> ,<strong>,<b>,<em> and <i> are allowed for preventing spam