Jump to content
Search Community

How can I use staggerfrom for everything in an array except for one object

8elias8
Moderator Tag

Go to solution Solved by Diaco,

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

Posted

I have a timeline with a staggerfrom in it and I'm trying to make it animate everything in the array except for the first object. How can I remove it from the array or just focus on all the rest of the contents of the array? 

 

Thanks

See the Pen cJAwg by Kyklos (@Kyklos) on CodePen.

  • Solution
Posted

Hi 8elias8  :)

 

 

try this , this work for class name or array :

tl.staggerFrom($(".classname").slice(1),0.5,{.....});

if array returne by class name ; u can use CSS selector too :

tl.staggerFrom(".classname:not(:first-child)",0.5,{.....});
  • Like 2
Posted

Thanks you works like a charm!!

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