BebDev Posted September 21, 2022 Share Posted September 21, 2022 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? Cheers! See the Pen mdLMrNx by abanobakram (@abanobakram) on CodePen Link to comment Share on other sites More sharing options...
Carl Posted September 21, 2022 Share Posted September 21, 2022 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() https://greensock.com/docs/v3/GSAP/Timeline/revert() I don't know enough about what you are doing to know if one is better than the other. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now