Jump to content

Gallery: Strips - autoplay?

Recommended Posts

Hi all!

Link to the page I'm working on: https://www.hooshdesigns.com.au/mango-silk-collective-copy

I'm currently trying to have three main images autoplay. Currently it's set to Gallery: Strips, but I'm hoping there's a way to have these three images auto-scroll through.

I've tried using the Gallery: Reel, but the images repeat over because there's only three, and I can't seem to get the images in large rectangles with the Reel like I can with the Strips. 

Essentially, I'm trying to maintain the same appearance with the large Strips but with an autoplay effect -  does anyone know if this is possible?

Thanks in advance!

Link to comment
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 10/22/2022 at 6:49 AM, tdm91 said:

Hi all!

Link to the page I'm working on: https://www.hooshdesigns.com.au/mango-silk-collective-copy

I'm currently trying to have three main images autoplay. Currently it's set to Gallery: Strips, but I'm hoping there's a way to have these three images auto-scroll through.

I've tried using the Gallery: Reel, but the images repeat over because there's only three, and I can't seem to get the images in large rectangles with the Reel like I can with the Strips. 

Essentially, I'm trying to maintain the same appearance with the large Strips but with an autoplay effect -  does anyone know if this is possible?

Thanks in advance!

The strips layout looks similar to Grid layout? Can you describe how you want to display images with autoplay effect?

It could be better if you can provide some demo/screenshots of the result you want to achieve

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
On 10/22/2022 at 6:49 AM, tdm91 said:

Hi all!

Link to the page I'm working on: https://www.hooshdesigns.com.au/mango-silk-collective-copy

I'm currently trying to have three main images autoplay. Currently it's set to Gallery: Strips, but I'm hoping there's a way to have these three images auto-scroll through.

I've tried using the Gallery: Reel, but the images repeat over because there's only three, and I can't seem to get the images in large rectangles with the Reel like I can with the Strips. 

Essentially, I'm trying to maintain the same appearance with the large Strips but with an autoplay effect -  does anyone know if this is possible?

Thanks in advance!

Add this to Mango Sild Collective Copy Page Header

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(() => {
    let add = '<div class="slider"><div class="slide-track" id="slides">'
    const interval = setInterval(() => {
        let imgs = $('section:nth-child(2) img');
        if (imgs.length > 0) {
            for (let j=0; j<3; j++) {
                for (let i = 0; i<imgs.length; i++) {
                    add += '<div class="slide"><img src="'+ $(imgs[i]).attr('data-src') +'" alt="" /></div>'
                    
                }
            }
            add += '</div></div>'
            $(add).appendTo('section:nth-child(2)');
            clearInterval(interval);
        }
    }, 100)
})
</script>
<style>
section:nth-child(2) > .content-wrapper {
    display: none;
}
section:nth-child(2) {
    display: block !important;
}
@keyframes scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-1687px)}
}

.slide img {
    height: 90px;
}

.slider {
	background: white;
	box-shadow: 0 10px 20px -5px rgba(0, 0, 0, .125);
	height: 100px;
	margin: auto;
	overflow:hidden;
	position: relative;
	width: 100%;
	padding: 50px 0;
}
	
	.slide-track {
		animation: scroll 25s linear infinite;
		display: flex;

	}
	
	.slide {
		height: 100px;
		padding: 0 40px;
	}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 11/6/2022 at 7:19 AM, tdm91 said:

Thank you for your responses and sorry for my late reply.

Tuanphan, what you've provided is essentially what I was after (with the images scrolling across) however when I add your code, the images become tiny (they do slide though) but it seems to break the section - here's a screenshot:

 

slider.png

this line controls size

.slide img {
    height: 90px;
}

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

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.