DREAM.

[MyBB] Appearing Scroll to Top

Recommended Posts

There are huge and lengthy jQuery scroll to top scripts are available throughout the web. But today we will learn to make an appearing scroll to top button with minimal jQ and CSS.

 

Initially, the scroll to top button will be hidden but as soon as the user will scroll down, the button will appear.

 

Open your footer template and add the following code at the very beginning:

 

 


 

and at the end before two close

tags:

 

 


   

Remember to change the Button Image to your needs. You may use this one as a quick paste:

OETNh.png

 

Save your footer template. Open global.css and add at the end:

 

 

#backtop {
position: fixed;
bottom: 50px;
right: 10px;
margin: 0;
padding: 0;
width: 36px;
height: 36px;
z-index: 100;
}

 

Remember to include jQ library in MyBB if it is already not. In headerinclude:

 

 



 

Enjoy scrolling back to top ...  :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.