Hello @GreenSock, Thank you so much for your response, and I can understand the delay with the huge amounts of posts and help you guys are doing here!
That worked like a charm! I did not know the difference between play and resume!
I assumed as much that is why my other solution with "onEnter and onLeave" worked with the same logic.
I just have a small follow up question regarding your suggestions to shorten the code.
I'm not familiar with the one animation timeline syntax, first of all is there documentation for that? As I've failed to find it.
This is my attempt but obviously it didn't really work.
ads.forEach(
function (ad, idx, array) {
gsap.to(sideBar,
{opacity:0},
{ scrollTrigger: {
trigger: ad,
start: `0 ${sideBar.clientHeight + 40}`,
end: `1% ${sideBar.clientHeight + 40} `,
toggleActions: toggleActionsStds,
ease: easingSetting,
duration:0.05
}
});
}
);
Let me know what I did wrong here. Thank you!