Back to Top

  • 1
  • Question
  • Updated 6 years ago
  • Answered
Is it possible to create a 'Back to Top' button at the bottom of some of my longer pages? John.
Photo of John

John

  • 16 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Hi John,

This is definitely possible.

First drag over an HTML widget to the top of your page and paste this in:


<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>


Then you can drag an HTML widget to the bottom of your page or anywhere else you want it and paste the following code in. It can be on there multiple times. The scroll to top will also be animated instead of just "jumping" to the top without any type of scroll.


<a href="#" onclick="$('body,html').animate({scrollTop:0},800);return false;">Back to Top</a>



If you have any questions or problems, please let me know.
Photo of John

John

  • 16 Posts
  • 0 Reply Likes
That works beautifully, thanks Nathan. Please would you mind seeing my other question re: text links. Cheers, John.