Jump to content

auto advance images in gallery section

Recommended Posts

Yes, it's odd isn't it. "Slideshow: Reel" doesn't have the autoplay option, but the other options do. "Slideshow: Simple", and "Slideshow: Full".

If you've got business/premium you could inject a script to locate the button and click it. You'd need to put something like this into Page Header injection (under advanced in the Page Header settings).

document.addEventListener("DOMContentLoaded",function() {
  const i = setInterval(function() {
  const el = document.querySelector(".gallery-reel-controls > div:nth-child(2) > button");
  if (el) { el.click(); };
  }, 5000);

this will scroll the first gallery reel it finds on the page by locating its "right" button and programatically clicking it every 5 seconds. 

  • If you want it to go the other way, you have to find the left button. change nth-child(2) to nth-child(1).
  • If you want the interval to be faster/slower, change 5000 for the value of the interval (in milliseconds, so 5000 is 5 seconds)
  • If you have multiple galleries like this on one page then you'll need to find the section id and put that in at the start of the selector. use Squarespace Id Finder Chrome Extension or looking up the data-section-id in the source

If you haven't got Business / Premium, then I don't think you can do it. You should raise this as a feature request with Squarespace as it seems odd the reel doesn't have it and the other galleries do.


Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.