Jump to content

[Share] Auto Scroll Gallery Grid

Recommended Posts

This code will turn Gallery Section - Grid to Autoscroll Carousel. If you can't make it work, you can comment below or message me.


Demo: https://tuanphan.squarespace.com/gallery-section-grid-autoscroll?noredirect

Pass: abc

#1. First, you need to add a Gallery Section - Grid


#2. Install Squarespace ID Finder to find ID of Gallery Grid


In my example, we will have



#3. Use this code to Page Header Code Injection (or Code Injection > Footer)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
$(document).ready(() => {
    let addLeft = '<div id="slider-left" class="slider"><div class="slide-track" id="slides-left">'
    const interval = setInterval(() => {
        let imgs = $('section[data-section-id="665be33616c8f9735222784d"] img');
        if (imgs.length > 0) {
            for (let j=0; j<10; j++) {
                for (let i = 0; i<imgs.length; i++) {
                    addLeft += '<div class="slide"><img src="'+ $(imgs[i]).attr('data-src') +'" alt="" /></div>'
            addLeft += '</div></div>'
    }, 100)
@keyframes scrollLeft {
	0% { transform: translateX(0); }
  100% {transform: translateX(calc(-250px * 30));}
.slide img {
    height: 75px;

.slider {
	height: 75px;
	margin: auto;
	position: relative;
	width: 100%;
#slider-left	.slide-track {
		animation: scrollLeft 150s linear infinite;
		display: flex;

	.slide {
		height: 75px;
		padding: 0 40px;
section[data-section-id="665be33616c8f9735222784d"] .section-border, section[data-section-id="665be33616c8f9735222784d"] .content-wrapper {
    display: none;

div#slider-left {
    margin-bottom: 70px;
  body, html {
    overflow-x: hidden;

#4. Note

In the code, I added same ID to 4 positions. You need to replace these IDs with your Gallery Section ID.

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
  • Replies 0
  • Views 276
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Posted Images

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.