Guest Posted August 11, 2021 Share Posted August 11, 2021 Site URL: https://safeharborcoronado.org/home added a gallery section to display 30 logos but squarespace 7.1 will not auto scroll right the logos, users must click an arrow to see all the logos. Is there any code I can apply to autoadvance the logos just like squarespace 7.0? Link to comment
iamdavehart Posted August 11, 2021 Share Posted August 11, 2021 Yes, it's odd isn't it. "Slideshow: Reel" doesn't have the autoplay option, but the other options do. "Slideshow: Simple", and "Slideshow: Full". If you've got business/premium you could inject a script to locate the button and click it. You'd need to put something like this into Page Header injection (under advanced in the Page Header settings). <script> document.addEventListener("DOMContentLoaded",function() { const i = setInterval(function() { const el = document.querySelector(".gallery-reel-controls > div:nth-child(2) > button"); if (el) { el.click(); }; }, 5000); }) </script> this will scroll the first gallery reel it finds on the page by locating its "right" button and programatically clicking it every 5 seconds. If you want it to go the other way, you have to find the left button. change nth-child(2) to nth-child(1). If you want the interval to be faster/slower, change 5000 for the value of the interval (in milliseconds, so 5000 is 5 seconds) If you have multiple galleries like this on one page then you'll need to find the section id and put that in at the start of the selector. use Squarespace Id Finder Chrome Extension or looking up the data-section-id in the source If you haven't got Business / Premium, then I don't think you can do it. You should raise this as a feature request with Squarespace as it seems odd the reel doesn't have it and the other galleries do. Dave Hart. Software/Technology Consultant living in London. buymeacoffee Link to comment
Guest Posted August 16, 2021 Share Posted August 16, 2021 Thanks Dave, I'll give your first suggestion a good and see how that goes 🙂 Link to comment
Guest Posted August 16, 2021 Share Posted August 16, 2021 Dave you rock! the script for page header was all I needed. Ridiculously easy. I changed 5000 to 2000 and very happy. Thanks so much🙂 Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.