Share Posted March 10, 2016 hi all, im trying to create a slide effect for the side nav and just after that a stagger for the `li` but I'm not sure how to get it done. i've tried two separate setTween() and also onComplete but i obviously doing something wrong this the animation plays wrong or not at all. so again, I just want the navbar to slide in when im scrolling to it and immidiatly after i want to `li` (.btns) to animate to var sideNanFrom = { opacity:.3, width:0, ease:Elastic.easeOut, onComplete:sidNavBtnTween } var sideNavTo = { opacity:1, width:130, delay:0.4 }; var btnsFrom = { scale:0, opacity:0, delay:0.9, ease:Elastic.easeOut } var sideNavTween = TweenMax.from("#secondary_nav", 0.6, sideNanFrom, sideNavTo) var sidNavBtnTween = TweenMax.staggerFrom(".btn", 1.5, btnsFrom, .2 ) side .setTween(sideNavTween) .setPin('#secondary_nav ul') .addIndicators() .addTo(controller); } Link to comment Share on other sites More sharing options...
Share Posted March 11, 2016 Hi and welcome to the GreenSock forums, It's a bit difficult to tell what the problem is from just looking at the code. Are you using ScrollMagic? If so you might want to check out there support if you are having trouble triggering animations via scroll. If this is a GSAP question regarding how to sequence you animation, please provide a very simple demo that only includes the animation code and elements necessary to recreate the issue. We suggest using CodePen: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now