So I'm using this readily available code to create a vertical text slider with eight div classes called "line" and text within each div.
All is working fine, except at the moment there's a slight delay before it loops back round to the start each time (after "Title 8").
I can't exactly work out why that is and how to fix it.
Any ideas?
var line = $('.line');
var tl = gsap.timeline({
onComplete: function(){
tl.restart();
}
});
TweenLite.defaultEase = Circ.easeInOut;
var time = 0.9;
var y = 100;
tl
.add ( TweenMax.staggerFromTo (
line, time,
{
opacity: 0,
y:y,
},
{
opacity: 1,
y: 0,
},
2 ))
.add ( TweenMax.staggerTo (
line, time,
{
delay: time,
opacity: 0,
y: -y,
},
2 ),
1.3)
});