Jump to content
Search Community

Small delay on timeline reverse()

icraft-websites 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

Hey forums, I've just started using TimelineMax and have put together a small sequence. But when I click to play it in reverse there is a small 1 second delay before it moves any animation yet when I click to play it forward there is no delay. This is what I have got. 

 

 var aboutMenuTimeLineIn = new TimelineMax({paused: true});

 

 buildMenuTimeline();

 

 function buildMenuTimeline(){
        var menu = $('.popup-menu-container');
        var overlay = menu.prev();
 
        aboutMenuTimeLineIn.to(overlay, 0.3 ,{autoAlpha: 1})
        .to(menu,.5, {
            autoAlpha: 1,
            top: 0,
            ease:Quint.easeIn})
        .to(menu,.5, {
            width: 800,
            ease:Quint.easeIn
        })
        .to([menu.find('.menu-option'), menu.find('.menu-close-box')], 0.1, {
            autoAlpha:1
        });
    }
 
    self.openMenuPopup = function(){
        aboutMenuTimeLineIn.play();
    };
 
    self.closeMenuPopup = function(){
        aboutMenuTimeLineIn.reverse();
    };

 

Link to comment
Share on other sites

To be honest that shouldn't be happening, so maybe something else is going on to cause the delay you mention. We'd need to see it in action to figure out what that is.

 

Thanks for the code sample, but a live sample we can test and play with is what we really need

http://forums.greensock.com/topic/9002-read-this-first-how-to-create-a-codepen-demo/

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