Jump to content

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

How can I get the rotationY value of rotating element on mouse over event?

Recommended Posts

I am using tweenmax.js for rotating elements , then when I hover currently it is pause the rotation then I need the value of roationY.

How can I get the value?

Link to comment
Share on other sites

Hi binnilal  :)


pls try this :


var target = $("#myDiv");
target.mouseover(function(){   console.log(target[0]._gsTransform.rotationY)   });

and pls check out CSSplugin Doc : http://greensock.com/docs/#/HTML5/Plugins/CSSPlugin/


All transforms are cached in a _gsTransform object attached to the element, so you can tween individual properties without worrying that they'll be lost. You don't need to define all of the transform properties on every tween - only the ones you want to animate. You can read the transform-related values anytime, like element._gsTransform.scaleX 

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