Jump to content
GreenSock

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

How to get updated properties of element while tweening such as left or right etc??

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

Hello,

I am new to greensock, And when I read and saw some videos of green sock I am realy happy and excited about it.

I want to ask, I am using Tween.to to move my button upto "600px".

When tween completes, I want updated 'left' of my button or any property I changed using tween, on a function defined on 'onComplete' of that tween.

 

Could you please help me in this?

 

Thanks,

Shridhar

shridhar.kulkarni@mediawide.com 

Link to comment
Share on other sites

GreenSock is pretty cool, right?  ^_^ This is easiest with something like jQuery, which can work out the computed/current style for you.

TweenLite.to('#someButton', 5, { left: 600, onComplete: function() {
    console.log($(this.target).css('left')); // 600px
} });
  • Like 3
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.
×