Jump to content
Search Community

Clickable progress bar

DevC test
Moderator Tag

Recommended Posts

Hi, I have this autoplay progress bar below. I've added clickHandlers to [Step 1, etc] and the bar zooms to the clicked step and stops, but I'm having a bit of trouble organizing the accompanying tweens.
 

1. Animating the active step label and the previous.
2. Transitioning the slide.

Thank you!

See the Pen xxMOqdL by dcha (@dcha) on CodePen

Edited by DevC
progress
Link to comment
Share on other sites

Hi @DevC ,

 

Why not manipulate the timeline you've already created? That is what GSAP is made for! You have to figure out what the best points are you want to show I've now just increment by 33% of the timeline (that splits it nice in thirds), but you can set it to any specific point. And you want to figure out what you want to do when you're at a specific slide, right now I've paused the timeline.

 

Oh and sidenote: I've changed your progress bar animation I've removed the width: 0% from the CSS converted it to a .from() tween and animate the scale instead of width.

 

Hope it helps and happy tweening! 

 

See the Pen yLZJpQa?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

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