Jump to content

Back To Top Button on Forums


Recommended Posts

Hello, I was curious if this was a feature in the default theme of IP Board as I have yet to come across it. My community is growing and the content being posted is as well so I have been looking for a back to top button that shows at the bottom of the forum to direct users well, back to the top :P Would love a helping hand on this feature, thank you.

 

*Edit: I am on the latest version of IP Board

Link to comment
Share on other sites

​Thank you very much for the response! Is there a way to change it to where it does not have that bouncing effect once it hits the top of the page? That is very off putting to me as I am just looking for a basic button.

​.

You can add one yourself in the template ..

Customization > theme > Edit HTML & CSS > Templates > globalTemplate (default the way it opens)

1. Find "elFooterNavigation" .. under this <div> you add a new line .. copy& paste this code :

 

<a _title="Go To TOP" href="#top" id="elTOP" class="ipsPos_right ipsType_large" data-ipstooltip="Go To Top" data-ipsmenu=""><i class="fa fa-chevron-up"></i></a>

 

2. Find "{template="includeJS" .. " .. under this line add a new line .. copy&paste this code :

 

<script>$(document).ready(function(){ $("a[href='#top']").click(function(){ $("html, body").animate({ scrollTop: 0 }, "slow"); return false;});});</script>

 

3. CSS .. not needed, but it will bump to RSS icon if you have it enabled .. into your "custom.css" .. add this:

 

#elTOP {margin-left: 15px;}

 

that's it  :)

little info: The "html, body" (in jQuery) is used for browser compatibility. Chrome scrolls with "body" & IE with "html" ..

 

 

2015-05-16_12-47-18.thumb.png.1b1d169778

 

 

.

Link to comment
Share on other sites

​.

You can add one yourself in the template ..

Customization > theme > Edit HTML & CSS > Templates > globalTemplate (default the way it opens)

1. Find "elFooterNavigation" .. under this <div> you add a new line .. copy& paste this code :

 

<a _title="Go To TOP" href="#top" id="elTOP" class="ipsPos_right ipsType_large" data-ipstooltip="Go To Top" data-ipsmenu=""><i class="fa fa-chevron-up"></i></a>

 

2. Find "{template="includeJS" .. " .. under this line add a new line .. copy&paste this code :

 

<script>$(document).ready(function(){ $("a[href='#top']").click(function(){ $("html, body").animate({ scrollTop: 0 }, "slow"); return false;});});</script>

 

3. CSS .. not needed, but it will bump to RSS icon if you have it enabled .. into your "custom.css" .. add this:

 

#elTOP {margin-left: 15px;}

 

that's it  :)

little info: The "html, body" (in jQuery) is used for browser compatibility. Chrome scrolls with "body" & IE with "html" ..

 

 

2015-05-16_12-47-18.thumb.png.1b1d169778

 

 

.

​That's much appreciated! I lack coding experience to handle this myself without a nice guide like this :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...