I have two carousels set up using cycle2. They are presented side by side with each occupying 50% of the screen width and 100% height. I've included a video below of what it looks like. These are set up as two different cycle2 inits then a delay is set on each of them to give the effect.
$('.vertical-slider-container .vertical-slider').each(function() {
var $this = $(this);
$this.cycle({
fx: 'scrollVert',
slides: '> .each-slide',
sync: true,
timeout: 3000,
speed: 1500,
random: false,
loader: true,
swipe: true
});
});
<div class="vertical-slider left" data-cycle-delay="1000" data-cycle-reverse="true"></div>
<div class="vertical-slider right" data-cycle-delay="1500" data-cycle-reverse="true"></div>
The issue I am having is that eventually they get in sync. Is there any obvious way I can keep these consistent so they always have the delay that remains constant?
I would try the following:
$( '#1st-carousel' ).on( 'cycle-after', function( event, opts ) { ... })
$('#2nd-carousel').cycle('next');
after a fixed amount of time, using the setTimeout
function