Jump to content

Slowly scrolling auto scroll for testimonials

Recommended Posts

Hello! I have scrolling testimonials on our website using a Custom CSS code. I have no problem adjusting the seconds between transitions to new slides; however, I'd like to make the transition itself slower, so it feels less jarring. Could someone please provide me with the right code for this?

Let me know! I've pasted my current code below for your reference:
 

<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('section[data-section-id="630305ced17aa33b3d1a4e54"] .user-items-list-carousel__arrow-button--right');
      reelControls.forEach(reelControl => {
        (function reelTimer() {          
          setTimeout(() => {
            reelControl.click();
            reelTimer();
          }, 12000);  // change this value to change the speed
        })();       
      })
    }
  });
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YQQGCZVL6V"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-YQQGCZVL6V');
</script>

 

 

Link to comment
  • Replies 2
  • Views 337
  • Created
  • Last Reply

Top Posters In This Topic

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.