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

Share this post


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

Share this post


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?

 

 

 

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×