Jump to content
Search Community

TweenLight - Using "-=50px" as a value for left property

Lucir 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

Hi, everyone

I'm new here and also new to Geensock. I'm trying to learn TweenLight and SplitText. I was trying to create a text that displays a fraction with a horizontal bar. My question relates to TweenLight using values like "+=50" or "-=50" to move an array of words to the right. I used the following statement:


var i;

 for(i = 7; i <= 12; i++){
        TweenLight.to(wordsA, 1, {left:"-=50px"});
I used the code pen http://codepen.io/anon/pen/zxbzZB
If its not possible to use "-=50px",  how would I retrieve the current position(left) of the element?

See the Pen zxbzZB by anon (@anon) on CodePen

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...