Jump to content

Auto slideshow scroll reel

Recommended Posts

  • Replies 2
  • Views 306
  • Created
  • Last Reply

Top Posters In This Topic

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (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?

Link to comment

Hi Ziggy,

Thanks for your response. 

I have tried it but it clashes with the current code for the top slideshow reel, and this code by crawford makes it scroll smoothly.

There are two different slideshow reels on the homepage at the moment.

If you have a look at the homepage, the top slideshow reel scrolls like a click, which i like. This is the code: 

!-- Gallery Reel Section Autoplay for hero images -->

<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 reelControl = document.querySelector('.gallery-reel-control [aria-label="Next Slide"]');
      if (reelControl) {
        (function reelTimer() {          
            setTimeout(() => {
              reelControl.click();
              reelTimer();
            }, 2000);  // change this value to change the speed           
        })(); 
      }
    }

I do like the way the top slideshow scrolls with this code, but I want to be able to make the bottom slideshow scroll similarly but instead of 2000, it scrolls 500 separately.

Or maybe a code like crawfords that only makes the bottom slideshow reel scroll smoothly but faster .

I hope that makes sense.

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.