Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
phillip_vale

Dollar Counter

Recommended Posts

Hi,

 

I am trying to make a counter. The namings might seem a bit weird but they are specific to another project that this is for.

 

Basically, once it is in it's final place the activeIndex will be determined by a slider.js that i have running.

 

Once the activeIndex == 1 or 2. it should set a number 49 or 70 that the count() function will count to.

 

Any help would be great!

 

Thanks,

 

Phil

See the Pen zBGLzy?editors=0011 by phillip_vale (@phillip_vale) on CodePen

Link to post
Share on other sites

Hi phillip_vale :)

 

Your pen had some errors so I just made a new one for you.

 

See the Pen QEyxLY by PointC (@PointC) on CodePen

 

Hopefully that helps a little bit.

 

Happy tweening.

:)

  • Like 4
  • Thanks 1
Link to post
Share on other sites

Hi would you make this work a $ sign, commas and decimal?

 

For example make it animate from $0.00 (or another number) to $829,546.42?

 

 

 

Link to post
Share on other sites
On 6/10/2016 at 7:32 PM, PointC said:

Hi phillip_vale :)

 

Your pen had some errors so I just made a new one for you.

 

 

 

 

Hopefully that helps a little bit.

 

Happy tweening.

:)

Can we add start & end attributes in HTML instead of JS

Link to post
Share on other sites
7 hours ago, Anmol Juneja said:

Can we add start & end attributes in HTML instead of JS

Sorry, I'm not understanding your question. Could you try rephrasing it? If you mean changing the numbers where "it should set a number 49 or 70 that the count() function will count to", you could use a data attribute and get those values from the HTML in the function instead.

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

×