Jump to content

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

Callback parameter vars wont work on TweenMax

Recommended Posts

Hey forums.


Iv'e run into an issue when passing data into a scroll event listener to fire a callback with preset variables.


The settings.in.func callback fires repeatedly instead of once and the vars object wont be accpeted in the TweenMax vars parameter.


The Code pen link provides this behavior when scrolling down.  

See the Pen xOZYYr by joshscorrar (@joshscorrar) on CodePen

Link to post
Share on other sites

Hey joshscorrar,


By golly that's a lot of ifs... ;)


I don't know what you are trying to achieve but I did manage to track down where your code is breaking. Thanks for the Pen, it would have been impossible otherwise.


You're not targeting the right bits when calling TweenMax:

TweenMax.to(eData.targetElm, eData.settings.in.dur, eData.settings.in);
// According to your object structure it should be something like the bellow
TweenMax.to(eData.targetElm[0], eData.settings.in.dur, eData.settings.in.vars);
  • Like 2
Link to post
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.