Hi there,
we’re new in the shopify community and setting up our new online shop (narrative theme). On our landingpage we added a slideshow with four images. That’s the code we added:
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');
}, 5000)
};
sections.extend('slideshow', slideshowAutoExtension);
The changing of the slides (images) isn’t stylish so we’re trying to change it. A slow fade in/fade out of the images and the heading would be perfect.
Is there a chance to add some code for fade in/fade out?
Thanks in advance!
Yannik