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

What is Framer? Join the Community
Return to index
Arlo Jamrog
Posted Oct 31 - Read on Facebook

Is there a wildcard selector type of feature for quickly selecting or iterating on layers with similar names? For instance, if I had col1, col2, col3 something like columns = Layers['col'+*]?

4 Comments

Seoh Char

that's possible, but not recommended.

Arlo Jamrog

Cha Seoh yes, my question is so that I don't have to write a function to do it, if one already exists.

Ces Cortez

Arlo Jamrog You can do something like this:
columns = layers.filter (x) -> ~x.name.indexOf "col"
http://codepen.io/anon/pen/CjuAk

Erik Edhagen

just use a simple for loop: http://codepen.io/erikedhagen/pen/lqLnA
for i in [1..3]
console.log Layers['col'+i]

Read the entire post on Facebook