Jump to content

How do I add auto-slideshow to my gallery?

Recommended Posts

Hi! I recently added a gallery section to my website, and the gallery type is currently set to "reel". While I have arrows on the sides to navigate, I've been unable to figure out how to set it up so that the pictures autoscroll rather than doing so only with input from my end. 

I'd appreciate any clarifications! 

 

 

Screen Shot 2022-10-28 at 11.20.00.png

Link to comment
  • Replies 1
  • Views 627
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

This is possible with some custom code. If you share link to page where you use Reel, we can help easier

You can also try adding this to Settings > Advanced > Code Injection > Footer

<script>
(function docReady(fn) {
	// see if DOM is already available
	if (document.readyState === "complete" || document.readyState === "interactive") {
		// call on next available tick
		setTimeout(fn, 1);
	} else {
		document.addEventListener("DOMContentLoaded", fn);
	}
})(() => {
	if (window.location == window.parent.location) {
		const reelControls = document.querySelectorAll('.gallery-reel-control [aria-label="Next Slide"]');
		reelControls.forEach(reelControl => {
			(function reelTimer() {
				setTimeout(() => {
					reelControl.click();
					reelTimer();
				}, 2000); // change this value to change the speed
			})();
		})
	}
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.