Website Building » Squarespace » How Do I Add Back to Top Button Squarespace?

How Do I Add Back to Top Button Squarespace?

Last updated on December 21, 2022 @ 4:00 pm

Adding a back to top button on your Squarespace website is a great way to improve the user experience for your visitors. There are a few different ways to add this button, and we’ll walk you through each method.

Method 1: Use a Plugin

There are a few different plugins that you can use to add a back to top button to your Squarespace website. One of our favorites is the “Scroll Back to Top” plugin from the WordPress Plugin Directory.

This plugin is free and easy to use. Once you install and activate the plugin, a new “Scroll Back to Top” button will appear in the top right corner of your website.

Method 2: Add Custom CSS

If you’re comfortable working with code, you can also add a back to top button by adding some custom CSS to your Squarespace website. First, you’ll need to create a new code block and add the following CSS:

#back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
display: none;
}
#back-to-top i {
font-size: 36px;
color: #fff;
padding: 10px;
border-radius: 50%;
background: #000;
}

Next, you’ll need to add the following code to your footer code injection area:

<a id="back-to-top" href="#"><i class="fa fa-angle-up"></i></a>

<script>

$(window).scroll(function() {

if ($(this).scrollTop() > 100) {

$('#back-to-top').fadeIn();

} else {

$('#back-to-top').fadeOut();

}

});

$('#back-to-top').click(function(){

$("html, body").animate({ scrollTop: 0 }, 600);

return false;

});</script>

This code will create a new anchor tag with an id of “back-to-top”. The anchor tag will be positioned in the bottom right corner of your website.

PRO TIP: If you are not comfortable working with code, we recommend finding a developer to help you add a back to top button on Squarespace. Adding code to your site can create unforeseen problems if done incorrectly.

When clicked, this anchor tag will scroll the page back up to the top. The final result will look something like this:

Method 3: Use Squarespace’s Built-In Functionality
If you’re using Squarespace 7.1 or above, you can take advantage of Squarespace’s built-in “Scroll To Top” functionality. To enable this feature, go to Design > Custom CSS and add the following code snippet:*/body { -webkit-overflow-scrolling: touch;}/*Once you save your changes, a new “Scroll To Top” button will appear in the bottom right corner of your website.*/

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.