Jump to content


Start Tween, then go to other page

Recommended Posts



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>





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

Hi, this will show you how to change the window.location once a tween completes using an onComplete callback.




if you need hijack the <a> tag and rip the href out and pass it into a function I'm sure that's possible too, but don't have the best idea for that.

Link to comment
Share on other sites

That's really super, Jamie. Thanks a ton.



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.