Alexdouglas142 Posted May 7, 2020 Share Posted May 7, 2020 How would i go about adding a autoplay on a carousel? I've got a carousel with a blog page pumped into it. Link to comment
derricksrandomviews Posted May 7, 2020 Share Posted May 7, 2020 Remember to add this to the page header code injection OR the header code injection for the Index if it's in an Index. Also it may not work in preview. Try testing it from an incognito window in your browser. <script> Y.on('domready', function () { try { var container = Y.one("#reviews"); /*change this to the slug of your page*/ var gallery = Y.Squarespace.GalleryManager.getGalleryByContainer(container); gallery.setAttrs({ "autoplay":true, "autoplayOptions": { "timeout":9000, /*make this higher to decrease speed, lower to increase it*/ "randomize": true } }); } catch (e) { console.error("Could not configure Gallery autoplay.", e); } }); </script> Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.