Jump to content
GreenSock

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

Click to show different divs

Go to solution Solved by PointC,

Recommended Posts

Hi, 

I've been trying to figure this out on my own, but I'm still stuck. I used @PointC code pen - 

See the Pen xqqyaE by PointC (@PointC) on CodePen

But my question is on click, how do I animate h5 to slide in left, and h3 to slide in right on entry AND exit?

 

I tried a timeline array and it didn't work very effectively.

 

Thank you

See the Pen OJxZXmE by NewbieRuby (@NewbieRuby) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @TrulyNewbie 

 

You went back into the archives for that old demo, didn't you? ;)

 

I'm not quite sure I follow the desired result, but it seems like you want the parent container to animate autoAlpha and the child h3/h5 to animate their position at the same time? Is that right?

 

If so, I think I'd make a timeline for each element and set an active variable to pick which timeline to play/reverse. Maybe something like this.

See the Pen QWqrdxR by PointC (@PointC) on CodePen

 

Is that what you needed or did I completely misunderstand the question?

 

Happy tweening.

:) 

  • Like 3
Link to comment
Share on other sites

@PointC Haha yes I did! Thank you for your help. This is perfect.

Thanks again

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