thank you for the reply, I have read the article and tested the codepen.
as i mentioned above I have no experience with javascript but I did my best.
Could you tell me what I am doing wrong here?
const texts = gsap.utils.toArray('.scrollingText');
texts.forEach(text => {
gsap.to(text, {
x:1000,
duration:50,
repeat:-1,
ease:'linear',
scrollTrigger: {
trigger: text,
}
})
});
gsap.utils.toArray('.scrollingText');
texts.forEach(text => {
gsap.to(text, {
xPercent:15,
scrollTrigger:{
trigger:".scrollingText",
scrub:1,
scrollTrigger: {
trigger: text,
scrub: true
}
}
});