Create a Back-to-Top in Squarespace

There are times I get lost reading a blog because it is just too long. You get at the bottom of the page and realized that you need to go a long way back up. If you want your readers to easily do it, you may use this simple tutorial for your website or blog running on Squarespace. Beginners will definitely follow along easily on this tutorial.

To make this script work, you have to load jQuery by pasting this into the Code injection Header Field:

<script src="//"></script>

1. Paste this into SettingsAdvancedCode InjectionHeader Field:

<a href="#" class="back-to-top">Back to Top</a>

2. Paste this into SettingsAdvancedCode InjectionFooter Field:

<!-- BACK TO TOP -->
var amountScrolled = 300;

$(window).scroll(function() {
if ( $(window).scrollTop() > amountScrolled ) {
} else {
$('a.back-to-top').click(function() {
$('html, body').animate({
scrollTop: 0
}, 400);
return false;

3. Paste this into Design -> Custom CSS


a.back-to-top {
display: none;
width: 50px;
height: 50px;
text-indent: -9999px;
position: fixed;
z-index: 999;
right: 30px;
bottom: 50px;
background: transparent url("") no-repeat center 43%;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;

a:hover.back-to-top {
transform: scale(1.1);

You may play with the CSS codes to adapt to your website or blog needs or design.

After successfully setting it up, you should now be able to see the image and click it to go up. I have this set up on my blog so you should see the result while reading this tutorial. I hope this helps. :)