I'm new to Framer and having an extremely annoying issue I've spent hours trying to solve.
I'm trying to build a statement that changes the opacity property of an object with the name passed through the variable sectionToLoad
. I'm able to log the statement perfectly in the console but it won't render. Any help would be much appreciated.
HideSection = (sectionToLoad) ->
PossibleSections = ["layerA", "layerB", "layerC", "layerD"]
for i in [0..PossibleSections.length - 1]
if PossibleSections[i] != sectionToLoad
console.log(PossibleSections[i])
PossibleSections[i].opacity = 1
else
console.log(sectionToLoad + ".opacity = 1")
# WHY DOESN'T THIS WORK?
sectionToLoad.opacity = 0
HideSection("layerB")
#BUT THIS DOES SOME REASON
# layerB.opacity = 1
Here's my framer file http://share.framerjs.com/9pv42mi6c99n/