How to Insert a Scroll To Top Tumblr Button


If your Tumblr blog just became too extensive and don’t want your readers to skip the site before they reach the top of the page, then this Scroll To Top Tumblr button is the solution. Not only this Tumblr Code allows you to go to the top in no time, but also go to the bottom, specially useful when you have endless navigation and you pulled tons of posts. If you have the time and a image editor, you can customize your Back To Top button with any picture you want, even add effects to it!.



How To Add a Scroll To Top/Back To Top Tumblr Buttons Arrows

  1. The first script that needs to be included in order to have a Back To Top Tumblr Button is the following script, paste it right before the </head> tag in your tumblr theme html:

  2. <script type="text/javascript"
        src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">
        </script>
         <script type="text/javascript" language="javascript">
             $(function () {
                 $('#scrlBotm').click(function () {
                     $('html, body').animate({
                         scrollTop: $(document).height()
                     },
                     1500);
                     return false;
                 });
     
                 $('#scrlTop').click(function () {
                     $('html, body').animate({
                         scrollTop: '0px'
                     },
                     1500);
                     return false;
                 });
             });
        </script>
  3. There’s a second bunch of code to implement the Scroll to Top/Back To Top Tumblr button. This code needs to be pasted right before the </body> tag in your Tumblr theme html.

  4. <a id=”scrlTop” title=”Top” href=”#” style=”position: fixed; bottom: 390px; right: 2px;”><img src=”http://static.tumblr.com/p2evvtm/Q7Tlyb7kn/arrow-scrolltotop-2.png”></a>
     
    <a title=”Home” href=”http://mrtumblring.tumblr.com/” style=”position: fixed; bottom: 361px; right: 25px;”><img src=”http://static.tumblr.com/p2evvtm/sOElyb7xb/home-page-tumblring.png”></a>
     
    <a id=”scrlBotm” title=”Bottom” href=”#” style=”position: fixed; bottom: 282px; right: 2px;”><img src=”http://static.tumblr.com/p2evvtm/DbPlyb7k4/arrow-scrolltotop.png”></a>
  5. In case you are not satisfied with our Scroll To Top Button Image, go to iconfinder.com and search for “arrows”, download the chosen image as a png file and save it. You can, and probably have to modify the size of it, and also create a mirror upside-down image of the arrow you just downloaded.
  6. Upload both images to Tumblr files uploader.
  7. Once Tumblr gives you the full url to the static image, you can replace the ones we used (the exact urls to be replaced are highlighted in red).
  8. Now, update preview, SAVE and check your Tumblr blog to check if it works.


The Back to Top Button tumblr can also be located in any spot you want. You just need to movidy the position attribute value within the tag

3 Responses to "How to Insert a Scroll To Top Tumblr Button"

Add Comment
  1. bbill64

    January 26, 2013 at 1:23 am

    No dice for me, not sure what I did wrong.

    [Reply]

  2. Rachel

    January 30, 2013 at 9:34 am

    Hmmm… This one doesn’t seem to work for me for some reason…

    [Reply]

    Mr. Tumblr Reply:

    because of your layout, you need to change it or contact the theme creator to find out how to make the scroll button work.

    [Reply]

Submit a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>