Jump to content
Search Community

Stagger multiple objects same class at once and not one by one

marko krstic 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

Hi @marko krstic,

 

The reason you get this behavior is that you're using a selector of ".line" which will gather all .line elements in the DOM and stagger through them. To affect just a single grouping of them, you'll want to use a unique parent identifier to single out a group. That could be done in a number of ways with selectors of various types ... the easiest would be an id attribute on each SVG. Have a look at this CodePen and my notes within,

 

See the Pen qvZpZy?editors=1010 by sgorneau (@sgorneau) on CodePen

 

Hope this helps!

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