Jump to content

Summary Block autoplay loop code fix for SS7.0 (Brine)

Recommended Posts

Site URL: https://lifelab.world/workshop-location-buchen

Hello Squarespace Experts!

I have recently encountered this cool code here by @tuanphan. It works perfectly but the only issue is the loop takes around 20-30seconds before it goes back to the start. Is there any fix ton increase the speed of the loop?

In addition, can I also add additional pages on the var container = Y.one("#spaces-photo-preview-2") by adding a comma? 

This is the code: I just need a loop speed fix
<!-- Summary Block Autoplay -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
  $(document).ready(function() {
    try {
     var container = Y.one("#spaces-photo-preview-2"); /*change this to the slug of your page*/
     var gallery = Y.Squarespace.GalleryManager.getGalleryByContainer(container);
     gallery.setAttrs({
       "autoplay":true,
       "autoplayOptions": {
         "timeout":3000, /*make this higher to decrease speed, lower to increase it*/
         "randomize": true
       }
     });
   } catch (e) {
     console.error("Could not configure Gallery autoplay.", e);
   }
});
</script>

Thank you so much in advance!

Link to comment
  • Replies 0
  • Views 249
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.