Jump to content
GreenSock

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

Variable element target

Recommended Posts

Hi, 

 

I have timelines that are the same, but that are targeting different elements, I've set a codepen to show an exemple,

would there be a way to simplify the three functions and timelines into one with a kind of parameter ?

Because only a letter is differing one to another but I can't figure out how I could ...

 

Thanks a lot in advance,

 

Olivier

 

See the Pen vYBLbBY by alguna (@alguna) on CodePen

Share this post


Link to post
Share on other sites
3 hours ago, alguna said:

Because only a letter is differing one to another but I can't figure out how I could ...

 

Using a letter makes no sense. Numbers are your friend when it comes to repeating something... and so are loops. There are many ways to do a loop, and here is one. 

 

See the Pen c35a7a69af6a6db997249a6111e6f930 by osublake (@osublake) on CodePen


 

 

  • Like 6

Share this post


Link to post
Share on other sites

Thanks @OSUblake , it indeed makes more sense this way! :)

Regards,

 

Olivier

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×