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

What is Framer? Join the Community
Return to index
Shirley Man
Posted May 17 - Read on Facebook

I am having trouble using a simple for-loop to attach on click events to my layers. I would like to animate the square that receives the click event (onClick->Scale 2x), but the 'layer' variable always points to the second square. Something obvious I am missing?


Balraj Chana

Just replace layer.animate with this.animate:

Shirley Man

Awesome. Do you know why layer doesn't work in this case?

Andy Ngo

Shirley Man I think the issue that you face is similar to this here:

Shirley Man

Thanks for your help. Fixed my prototype.

Read the entire post on Facebook