Mo5 Posted August 20, 2022 Share Posted August 20, 2022 I have a progress bar and I want it to become full in 15 seconds but empty in 5 seconds See the Pen QWmYxyb by Mo2S (@Mo2S) on CodePen Link to comment Share on other sites More sharing options...
Solution awazigh Posted August 21, 2022 Solution Share Posted August 21, 2022 Hey Mo! Something like this? const tlBar = gsap.timeline({paused: true}) tlBar.from('.two span',{ scaleX:0, transformOrigin: "left center", }) ScrollTrigger.create({ trigger:'.two', start:'center center', markers:true, onEnter: () => { tlBar.play().duration(15) }, onLeaveBack: () => { tlBar.reverse().duration(5) } }); 3 Link to comment Share on other sites More sharing options...
Mo5 Posted August 22, 2022 Author Share Posted August 22, 2022 yea! that's what I want... Thank you so much! 1 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