This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Tyrale Bloomfield
Posted Jul 13 - Read on Facebook

Is there a better way to write is out?

Card.on Events.Click, ->
Card.states.next()
Account.states.next()
Logo.states.next()

5 Comments

George Kedenburg III

looks good to me, what are you trying to improve on?

Tyrale Bloomfield

I will be triggering +7 items, was wanting a CSS type addition line. Card, Account, Logo.states.next()

Andreas Wahlström

the most common approach is to create an array which you use to loop through the layers. here's an example: http://share.framerjs.com/7zu599fcku4b/ (click the white box)

Balraj Chana

Try:
for layer in [card, account, logo]
layer.states.next()

Tyrale Bloomfield

Oh, both are very helpful, Thank you.

Read the entire post on Facebook