Insider Posted September 12, 2022 Posted September 12, 2022 (edited) 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? Cheers. Edited September 12, 2022 by Insider
Solution Beyondspace Posted September 16, 2022 Solution Posted September 16, 2022 (edited) 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? 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 September 16, 2022 by bangank36 Insider 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Insider Posted September 25, 2022 Author Posted September 25, 2022 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!
Beyondspace Posted September 25, 2022 Posted September 25, 2022 I check that it works fine on my device. Have you tried check on Incognito mode? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
bonesie Posted January 26 Posted January 26 Hey there, sorry I'm late to the party. I've inserted this code into my site and it works great! However, I have two carousel-style sections on the same page and the code only seems to target whichever section comes first. I would like for the code to only target the second one instead. Any ideas?
creedon Posted January 26 Posted January 26 1 hour ago, bonesie said: I have two carousel-style sections on the same page and the code only seems to target whichever section comes first. Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. You may find How to post a forum question post useful. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment