Jump to content


How to show the element in 3 seconds after page load?

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

I set element id="text" opacity as 0. I want it to appear in  three seconds after page load. I am using delay, but it is not working.

See the Pen jLYaba by sunnie19 (@sunnie19) on CodePen

Link to comment
Share on other sites

Mikel's example works great, but it also appears that switching the from() tween to a to() tween will do the trick as well


var tl = new TimelineMax({
    repeat: -1,
    repeatDelay: 3,


In your css you gave #text and opacity of 0 so you need to tween to an opacity of 1 for it to appear.


See the Pen mMXwyd?editors=0010 by GreenSock (@GreenSock) on CodePen


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