Jump to content
Search Community

Staggering within timeline with .to() keyframes

ryan_brwn test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hi all!

 

I have curious question. Does anybody know why the code below would work perfectly fine on Codepen and also work on my local machine when I'm loading GSAP via CDN, BUT when I load GSAP locally via a copy gsap.min.js the keyframes doen't seem to acknowledge the staggers (I have a screen recording attached below).
 

let tl = gsap.timeline();

tl.to( document.querySelectorAll('.box'), {
	keyframes: [{
		alpha: .25,
		duration: .045
	}, {
		alpha: 1,
		duration: .045
	}, {
		alpha: .25,
		duration: .045
	}, {
		alpha: 1,
		duration: .045
	}, {
		alpha: .25,
		duration: 1,
		ease: Sine.easeIn
	}],
	stagger: .5
}, 2).to('.box-04', {
	rotate: 360,
	duration: 2,
	alpha: 1,
	ease: Expo.easeOut
}, '+=.5');

 

 

See the Pen f4c38c451e6454042c6f8c799c59d4bb by ryankbrown (@ryankbrown) on CodePen

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