Jump to content
GreenSock

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

Question about TimelineMax paused properties

Recommended Posts

Hi, I am pretty new to GreenSock, so i might ask a silly question.

 

Problem is I create a variable like:

 
var tl = new TimelineMax({paused:true, repeat: -1});
 
and i set the tl.from(element, 1, {opacity: 1});   element's original css opacity is 0
 
and i will play it in some onClick function.
 
Problem is my element original opacity is 0, and before I trigger Click event, the above code would already set my element opacity to 1. This is not what i want.
 
What I want is that the element's opacity is 0, when I play the TimelineMax, i would play a tween to make my element from opacity:1 to opacity: 0
 
 
Here is my codepen: 
 
Hope someone could give me a hint, thanks....

See the Pen wMyLMZ by DanielYKPan (@DanielYKPan) on CodePen

Link to comment
Share on other sites

Diaco is exactly right. This video explains immediateRender: 

  • Like 1
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.
×