Jump to content


Clearprops not working with .from()

Recommended Posts

Hi guys,


Sorry for being a headache, but just found an issue that I when I try to inline style given to the element, it does not work. What I want here is to use clearProps after 2 seconds. After two seconds, what I see is image still hidden.


Am I doing something wrong?



See the Pen mdLMrNx by abanobakram (@abanobakram) on CodePen

Link to comment
Share on other sites

you are pausing the timeline at the beginning with progress(0) pause() and then placing the set() at the end of the timeline.

It would be more appropriate just to use 


gsap.set( "#sticky-elem" , { clearProps: 'all' });


this is not associated with a placement in the timeline and will be called immediately.


you might also use timeLine.revert()




I don't know enough about what you are doing to know if one is better than the other. 

  • Like 2
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.