Jump to content
Search Community

Start Tween, then go to other page

Stefdv test
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

Hello,

 

When i load my page, a picture slides in. Now, when i press on a link to go to another page, i need this image to slide out first.

Anyway i can resolve this with a tween ?

 

I guess i need to use the onComplete and then goto a function that loads the new page.

So, i'm not sure this is Greensock related :? . Could be a java question .

 

Anyway; ( can't get the code tag to work, it only shows a scrollbar )

 

 

<li id="NavLink"><a href="/somepage" ><span>SomePage</span></a></li>

 

 

$('#NavLink').click(function()

{

TweenLite.to(navImage, 1, {css:{left:"-700px"}, ease:Power2.easeOut});

});

 

 

 

I have a click function that should start the tween when i press the link, problem offcourse is that the new page loads imidiatly, and the ' going out' tween never starts. ( or maybe it does, we just won't see it ).

 

ps ( a one page design is not an option ).

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