Jump to content

Autoplay Second Carousel Summary Block on Page

Recommended Posts

Posted

I have a piece of code that I found online that auto plays a carousel summary block, but it only plays the first one on the page. Does anyone know a way for me to make it affect only the second summary block on the page? I've been googling and can't find an answer. I'm not great with code.

 

<!-- Summary Block Autoplay -->
<script>
window.onload = function() {
  var nextArrow = document.querySelector(".summary-carousel-pager-next");
  
  function clickNext() {
    nextArrow.click();
  }
 
  setInterval(clickNext, 3000);
};
</script>

 

  • Replies 2
  • Views 555
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted

It looks like it should apply to all of the summary carousels, do you have the next/previous arrows on for both summary blocks?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

I do not, but I know this works only on the first one and it doesn't matter if the arrows are turned on or off, because that is how it functions on another page on my site.

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.