Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[Tutorial] Jquery back to top image tut


So do you want on your theme what we got here?

A back to top button that appears when you scrolled down and disappears when you scrolled up?

This tutorial is made specifically for MyBB and not any other platform. But if anyone requests it I can try to make one for another platform to.

Lets get Started

Log in to your admin Cp < Templates and Styles < Templates < Your theme templates < Ungrouped Templates < headerinclude


Add After:
<script src="" type="text/javascript"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript">
jQuery(function($) {
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
} else {
$('.ontop').click(function () {
scrollTop: 0
}, 1000);
return false;

Go to: Templates and Styles < Templates < Your theme templates < Footer Templates < footer


<div id="copyright">

Add After:

<div id="totop" style="display: none;">
<a href="#top" class="ontop"><img src="{$theme['imgdir']}/top.gif"></a>

Go to: Templates and Styles < Themes < Your theme < Global.css

Add at the bottom:
#totop {
    bottom: 150px;
    display: none;
    position: fixed;
    right: 1.5%;
    z-index: 1000;


It could be you already got this present in your headerinclude:
<script src="" type="text/javascript"></script>

If that is the case then remove it out of the code first given in this tutorial.


The following image to your theme folder. Or use any other to top image if you want. Preferably 32x32 or smaller.

[Image: attachment.php?aid=3]

CSS Button

If there is a demand I can make a tutorial on how to use no image but just all css.

Originally posted:
Thanks for sharing. I'll have to add the improved "back to top" image here at Makestation sometime. - Our next project...
Have no idea, I didn’t even hear it before, actually I am a student of law and do not deals with this kind of stuff.
Ban reason: "I don't have any idea, actually I am a student of law and do not deals with this kind of stuff." (Permanent)

Users browsing this thread: 1 Guest(s)

Makestation Theme/Design Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2021
Forum design by Makestation Team © 2020 - a modern day time capsule | Makestation Ajax Chat Hosting