I've got a simple image that has a default opacity: 0 in my css. Halfway through the page I set the opacity to 1 with the following code:
gsap.to(simpleImage, {
opacity: 1,
ease: 'none',
scrollTrigger: {
trigger: trigger1,
start: 'top 100%',
end: 'top 75%',
}
})
When scrolling a bit more down I set the opacity back to 0 with the following code:
gsap.to(simplmeImage, {
opacity: 0,
ease: 'none',
scrollTrigger: {
trigger: trigger2,
start: 'bottom 100%',
end: '100',
}
})
When the simple image has opacity 0 I scroll back up but it's not reversing the second trigger. It only goes back to opacity 1 when I hit the first trigger. Why Is it not going back to opacity 1 in the second trigger by scrolling back up?