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

What is Framer? Join the Community
Return to index
Johannes Eckert
Posted Aug 24 - Read on Facebook

need some javascript/coffeescript help:

Trying to create layers with a function and want to address those layers later by name. Is that even possible?

http://share.framerjs.com/q950i2a5jaba/

Or is my only option to create and store these in an object in window?

6 Comments

Johannes Eckert

this works, but seems less elegant

Johannes Eckert

actually, I answered my own question, and it seems perfectly fine doing it like that

Andreas Wahlström

you can also return box as the last statement in createSlider() and assign it to a variable. eg: numberOfColumns = createSlider(1200,224)

Johannes Eckert

Andreas Wahlström yesss! that's it.

Chad Lonberger

Assuming you ended up somewhere near this?

Johannes Eckert

yes, exactly Chad. works like a charm

Read the entire post on Facebook