hayleysb13 Posted August 22, 2022 Share Posted August 22, 2022 Site URL: https://www.theproductiveco.com/ Hello! I am trying to make the testimonials for our website (created using 7.1 automated "people" section) auto-scroll. Could someone provide me with a Custom CSS for this? Link to comment
Beyondspace Posted August 22, 2022 Share Posted August 22, 2022 1 hour ago, hayleysb13 said: Site URL: https://www.theproductiveco.com/ Hello! I am trying to make the testimonials for our website (created using 7.1 automated "people" section) auto-scroll. Could someone provide me with a Custom CSS for this? I think it can be achieved by using some javascript code to set interval the clicking on next button <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(); }, 2000); // change this value to change the speed })(); }) } }); </script> Hope it can help tuanphan and hayleysb13 2 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
hayleysb13 Posted August 24, 2022 Author Share Posted August 24, 2022 On 8/22/2022 at 11:30 AM, bangank36 said: I think it can be achieved by using some javascript code to set interval the clicking on next button <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(); }, 2000); // change this value to change the speed })(); }) } }); </script> Hope it can help Thank you! This worked great! Beyondspace 1 Link to comment
Insigneia4 Posted January 13 Share Posted January 13 Hmmm. I'm trying to do the same thing, but this isn't working for me. I want "The Parent Authentically Program is For you If..." section to auto scroll, ideally just on mobile. https://apricot-wombat-3szr.squarespace.com/ password: authentic Link to comment
tuanphan Posted January 15 Share Posted January 15 On 1/14/2024 at 12:30 AM, Insigneia4 said: Hmmm. I'm trying to do the same thing, but this isn't working for me. I want "The Parent Authentically Program is For you If..." section to auto scroll, ideally just on mobile. https://apricot-wombat-3szr.squarespace.com/ password: authentic Try this code <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('.user-items-list-item-container[data-section-id="659749209c31234034e21779"] .user-items-list-carousel__arrow-button--right'); reelControls.forEach(reelControl => { (function reelTimer() { setTimeout(() => { reelControl.click(); reelTimer(); }, 2000); // change this value to change the speed })(); }) } }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
jasondane Posted March 21 Share Posted March 21 Hi @tuanphan I also have a similar testimonial section on my page: https://avocado-pelican-7gtm.squarespace.com/ password: boconcept Can you please help how I can have it to auto scroll? Thanks! Link to comment
tuanphan Posted March 25 Share Posted March 25 On 3/21/2024 at 12:47 PM, jasondane said: Hi @tuanphan I also have a similar testimonial section on my page: https://avocado-pelican-7gtm.squarespace.com/ password: boconcept Can you please help how I can have it to auto scroll? Thanks! You can use this code <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('.user-items-list-item-container[data-section-id="65fbc8eb0b899b68d63c824e"] .user-items-list-carousel__arrow-button--right'); reelControls.forEach(reelControl => { (function reelTimer() { setTimeout(() => { reelControl.click(); reelTimer(); }, 2000); // change this value to change the speed })(); }) } }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
jasondane Posted March 26 Share Posted March 26 Hi @tuanphan I tried adding the script but it doesn't seem to work. Link to comment
tuanphan Posted March 29 Share Posted March 29 On 3/27/2024 at 6:52 AM, jasondane said: Hi @tuanphan I tried adding the script but it doesn't seem to work. Try clearing browser cache or log out account and check again Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment