Jump to content

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

Using a predefined css rule as an animation parameter

Recommended Posts

Hi all,


I'd like to know if its possible to use TweenMax/Lite with a predefined CSS rule, something like this:




     left: 20px;

     top: 50px;



TweenLite.to( myDomElement, 0.5, { someClass });


In this way I could lay out a bunch of scenarios and animate to them as needed.



Link to comment
Share on other sites

Hi! Welcome to the GreenSock forums.


You can tween a classname




TweenLite.to(myElement, 1,{className:"sample"});



Please see the getting started guide and the CSSPlugin docs for more info.

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.