Jump to content

How to make gallery carousel into a continuous/infinite loop?

Recommended Posts

Hi all,

I'd like to know if it's possible to have a gallery carousel run in an infinite loop so that after the last image, it continues scrolling in the right direction starting at the first image again. Ideally this would apply to all gallery carousels but if too difficult, just on blog posts would be great also.

Can this be solved with coding?

https://projectsinsider.com/project/3-rubida-court-endeavour-hills

lifeisgood

Cheers.

Link to comment
  • Replies 5
  • Views 4.5k
  • Created
  • Last Reply

Top Posters In This Topic

Try adding to Settings > Advanced > Code Injection > Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
	setInterval(function(){ 
	$('a.next[aria-label="Next Slide"]').click()
	},2000);
})
</script>

 

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
On 9/5/2021 at 11:53 AM, tuanphan said:

Try adding to Settings > Advanced > Code Injection > Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
	setInterval(function(){ 
	$('a.next[aria-label="Next Slide"]').click()
	},2000);
})
</script>

 

After the last slide, the next click still goes back to the first image going the left direction. I was hoping for the right direction.

Thank you for trying @tuanphan!

Edited by Insider
Link to comment
  • 2 years later...
  • 6 months later...

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.