Jump to content
Search Community

Animating number

zureshm test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Sure, here's the same thing done with GSAP:

 

See the Pen bmsED?editors=101 by jamiejefferson (@jamiejefferson) on CodePen

TweenLite.to({ d: 110 }, 2, {
  d: 90,
  roundProps: 'd',
  ease: Linear.easeNone,
  onUpdate: function() {
    $("#gsapBox").html(this.target.d);
  }
});

Check out the intro materials at http://www.greensock.com/get-started-js/, and especially the Jump Start if you you're still getting your feet wet.

 

 

Also I'm not sure if that number tween was all you meant by a slider, or if you were after controls as well? Anyway if you need it, here's an example of a GreenSock animation being controlled by a jQuery slider:

 

See the Pen AwCKp by GreenSock (@GreenSock) on CodePen

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