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

What is Framer? Join the Community
Return to index
Денис Дрожжов
Posted Aug 20 - Read on Facebook

Does anybody know why this is not working? http://share.framerjs.com/h65fpfgwkfyl/
I'm trying to create a bunch of blocks with horizontal scrolling inside long vertically scrolled screen. The idea is to disable horizontal scrolling inside blocks when I scroll the whole screen. And when I scroll inside small blocks, vertical screen scrolling should be disabled.
Somehow, only the last block works as intended. Others try to block horizontal scrolling without any reason. Any ideas why this happens?
My code is quite awful, 'cause I'm not a programmer, sorry :-)

2 Comments

Anton Kartashov

Hey. Look here http://share.framerjs.com/c4kuuedh6esq/

I think here's classic problem when loop "for" meets the eventListener "on". Method ".on" works but only with the last object (b4).

http://stackoverflow.com/questions/111102/how-do-javascript-closures-work

Денис Дрожжов

Thanks, Anton. I made a closure as you said. It still has some glitches, but it works.

Read the entire post on Facebook