Jump to content
Search Community

Animating a <ul> with a delay on each <li>

The Refinery test
Moderator Tag

Go to solution Solved by Dipscom,

Recommended Posts

  • Solution

Hey Refinery!

 

You are just overthinking it a bit. All you need is the following:

 

gsap.from(".list__item", {
  opacity: 0,
  duration: 0.5,
  x: 50,
  stagger: 0.5
});

What you are doing in your code is creating an individual Tween for each of the list items, not a timeline that contains all the items. As each tween is independent and only contains one item, there is nothing to stagger and they all paly at the same time.

  • Like 2
  • Thanks 1
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...