Jump to content
Search Community

ScrollTrigger FadeIn/Out component not working properly

Gxneral test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I am trying to create a component that I wrap my other components with to fade in when I scroll to them and fade out when I scroll passed them. I think the problem arises when I put 2 animations on the same component. I just don't know how to fix it. 

I think the problem is that I am using from() and to() and they take the CURRENT value of the div which might be opacity: 0 and thus it remains invisible or sometimes it becomes opacity:0.2. What would be a better approach to this?

See the Pen ZEozRNZ by gxnxrxlmasri (@gxnxrxlmasri) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...