I want to add classes on HTML elements one by one.
TweenMax.staggerTo(".some-class-name", 0.5, { className: "+=animation-class" }, 0.5);
I have this code, but it doesn't work. More precisely it works, but it doesn't add className one by one.
How can I achieve an effect like this codepen but with className?
                        
Seems fine to me.
var duration = 0.5; var stagger = 0.5; var someClassName = '.some-class-name'; var animationClass = 'animation-class'; TweenMax.staggerTo(someClassName, duration, {className: '+=' + animationClass, transformOrigin: 'bottom right', ease: Power4.easeOut}, stagger);Hope this helps.