Shopify themes, liquid, logos, and UX
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Hi - I have added the following code to custom.js to allow my slideshow to autoplay. But I would like it to stop looping (i.e. autoplay stops after 1 cycle). How can I do this? Thanks 🙂
var sections = window.theme.sections;var slideshowAutoExtension = {init: function() {this.on('slideshow_desktop_init_done', this._autoplaySlideshow.bind(this));},_autoplaySlideshow: setInterval(function() {var $slide = $('.slideshow__slide--active').removeClass('slideshow__slide--active');var $button = $('.slideshow__button--active').removeClass('slideshow__button--active');var $slides = $('.slideshow__slide');var currentIndex = ($slides.index($slide) + 1) % $slides.length;$slides.eq(currentIndex).addClass('slideshow__slide--active');var $buttons = $('.slideshow__button').eq(currentIndex).addClass('slideshow__button--active');}, 2000)};sections.extend('slideshow', slideshowAutoExtension);
User | RANK |
---|---|
124 | |
95 | |
77 | |
59 | |
46 |
Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022Shipping can be one of the most vital parts to set up and manage your business. Understand...
By Ollie Dec 16, 2022