Glenwing Posted October 28, 2022 Share Posted October 28, 2022 Hi! I recently added a gallery section to my website, and the gallery type is currently set to "reel". While I have arrows on the sides to navigate, I've been unable to figure out how to set it up so that the pictures autoscroll rather than doing so only with input from my end. I'd appreciate any clarifications! Link to comment
tuanphan Posted October 31, 2022 Share Posted October 31, 2022 Hi, This is possible with some custom code. If you share link to page where you use Reel, we can help easier You can also try adding this to Settings > Advanced > Code Injection > 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('.gallery-reel-control [aria-label="Next Slide"]'); 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment