Website Building » Squarespace » How Do I Auto Scroll on Squarespace?

How Do I Auto Scroll on Squarespace?

Last updated on December 28, 2022 @ 8:00 pm

There are a few different ways that you can auto scroll on Squarespace. One way is to use the built-in function in the Page Settings panel. Another way is to use a third-party plugin or code injection.

To use the built-in function, go to the page you want to add auto scrolling to and open the Page Settings panel. In the General tab, scroll down to the Page Layout section and select Auto Scroll from the drop-down menu.

If you want more control over how the auto scrolling behaves, you can use a third-party plugin or code injection. For example, the Smooth Scrolling Plugin by Luke Haas gives you a lot of options for how the scrolling will work, such as how fast it will scroll and whether it will be a smooth scroll or not.

PRO TIP: If you are not careful, auto scrolling on Squarespace can result in a loss of control over your site. This can result in pages that are difficult to navigate and may even cause your site to crash.

To use code injection, go to the Code Injection tab in the Page Settings panel and add this code snippet:

<script>
window.onload=function(){
var autoScroll = setInterval(function() {
    window.scrollBy(0,1); // horizontal and vertical scroll increments
},20); // scrolls every 100 milliseconds
}
</script>

You can adjust the speed of the scrolling by changing the "20" value in the code snippet. The lower the number, the faster it will scroll. You can also add this code snippet to your site-wide code injection if you want all pages on your site to have auto scrolling.

Auto scrolling can be a great way to add some interactivity to your Squarespace site. It's easy to set up and there are a few different ways to do it. Try it out on your site and see what works best for you!

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.