Jump to content

How to make a testimonial section autoplay?

Go to solution Solved by Beyondspace,

Recommended Posts

  • Solution
On 9/12/2022 at 11:27 AM, Insider said:

Site URL: https://www.townly.com/buyers-agent

Hi Squarespace Gurus,

Is there a way to make the testimonial section on this page autoplay at a speed of 5seconds?

image.thumb.png.35f1775db2f3e954b6c878d3ebe5fb07.png

Cheers.

 

Try adding to Home > Settings > Advanced > Code Injection, choose 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('section[data-section-id="631ea5ca51037517a8d6c397"] .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>

Original solution: 

 

Edited by bangank36

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 2 weeks later...
On 9/17/2022 at 12:17 AM, bangank36 said:

Try adding to Home > Settings > Advanced > Code Injection, choose 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('section[data-section-id="631ea5ca51037517a8d6c397"] .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>

Original solution: 

 

Have inserted the code into Footer Injection but nothing has changed.


Anything else I could try?

Thanks again!

Link to comment

I check that it works fine on my device.

Have you tried check on Incognito mode?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. 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.