Jump to content

How do you automate a hero slide show in Squarespace 7.1

Recommended Posts

  • Replies 5
  • Views 1k
  • Created
  • Last Reply

Top Posters In This Topic

On 6/18/2022 at 5:45 AM, tommb said:

Site URL: https://www.upcyclepianocraft.com/

Hi there, I've added a slide show of hero shots to my home page and I'd like to get them to advance automatically but there's no setting for that. I'm kinda surprised! Is there a way to do this in 7.1?

Add to Settings > Advanced > Code Injection > Header

<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('.user-items-list-banner-slideshow__arrow-button--right');
		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
  • 3 months later...
  • 1 year later...

Hmmm, I tried this and it's not working for me? I went to the OP's webpage and looked at the source code, and mine looks identical but nothing happens. Any idea what I am missing?

view-source:https://www.skippers.com/

Link to comment
On 3/18/2024 at 11:12 PM, wschwisow said:

Hmmm, I tried this and it's not working for me? I went to the OP's webpage and looked at the source code, and mine looks identical but nothing happens. Any idea what I am missing?

view-source:https://www.skippers.com/

I see you are using Will Myer Plugin to create Slideshow, I think the plugin has an option to make autoplay, you try checking it again

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.