UtopiaCreates Posted August 14, 2021 Posted August 14, 2021 Simple Question, is there a way via css or js/jq to have the autoplay for a full screen gallery section take longer than 10 seconds?
iamdavehart Posted August 15, 2021 Posted August 15, 2021 Squarespace stores the settings in a data-props attribute, and it seems that if you can get to that and update it then the timer for the slideshow does appear to honour it. It's possible that there's a race-condition going on here, but I've tested it and it worked on my 7.1. You'd need business/premium to do it because we're changing an attribute with javascript. put this in the page header code injection (Advanced in the pages Settings): <script> document.addEventListener("DOMContentLoaded",function () { const slide = document.querySelector(".gallery-fullscreen-slideshow"); const att = slide.getAttribute("data-props"); const attJSON = JSON.parse(att); attJSON["slideDurationMs"]=20000; slide.setAttribute("data-props",JSON.stringify(attJSON)); }); </script> waits for the document to load all its content finds the first fullscreen gallery slideshow in the page gets its data-props attribute and changes the sub-property of slide duration (in milliseconds, so 20seconds = 20000) update the attribute Give it a try! Dave Hart. Software/Technology Consultant living in London. buymeacoffee
UtopiaCreates Posted August 15, 2021 Author Posted August 15, 2021 @iamdavehart Thank you sir, this works perfectly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.