Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
celli

stagger nested elements

Recommended Posts

Hi, I am trying to get my elements to stagger at the same rate, however since some of my elements are nested in an unordered list, those elements that are nested move 2x the amount, since they also take on the distance calculated by their parent. I am unable to change the markup since it is a navigation and the nested sub level navigation needs to stay where it is in the html markup.

 

Is there a way to still have these elements stagger with the rest of my elements, while ending their x position 300px to the right, without factoring in the additional 300px from the parent? Currently the 'sub-lines' move too far to the right, since their new position also takes it's parent's tweened position into account.

 

 

 

See the Pen bGoXXzz by celli (@celli) on CodePen

Link to comment
Share on other sites

@PointC, Ahh I see the trick is to make the <a> tags inline-block ?  Initially I was trying to animated the <a> tags but they do not animate, without that css!

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