Jump to content
GreenSock

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

How can I make a title slide in and then slide out with timelineLite?

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

Hey, so I want to do what the title says: make a title slide in and then slide out with timelineLite. My code is in this jsfiddle. I know that, because I remove the top property, the title goes down, but what I wanted was that that going down was part of the transition, and not an instant thing, like it it is now. Is there a way to make this work?

Thanks! (By the way, I'm new in the forum, so I'm sorry if I made any mistakes asking this question.)

Link to comment
Share on other sites

Hi JocaPinto  :)

 

pls try like this :

var tl = new TimelineLite();

tl.from("#title",1,{ top:'-10%' , ease: Elastic.easeOut })
  .to("#title",1,{ top:'100%', ease: Elastic.easeIn } ,'+=1');

or

var tl = new TimelineLite();

tl.from("#title",1,{ y:-100 , opacity:0 , ease: Elastic.easeOut })
  .to("#title",1,{ y:200 , opacity:0 , ease: Elastic.easeIn } ,'+=1');

btw , pls don't post same question twice in forums  . thanks in advance :)

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