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

What is Framer? Join the Community
Return to index
Riccardo Zecchini
Posted Aug 08 - Read on Facebook

mmm super basic question here: how can I click on a element and have a layer to scroll n pixels? I tried setting the layer.scrollY = value but it doesn't work (probably I can only read values with that?).
Obviously working with the layer.y position doesn't work because it totally changes the layer position. Thanks a lot!


Rafael Puyana

When you say scroll do you mean a) dragging it vertically with your mouse or b) animating it from y:a to y:b

Marc Krenn

Rafael, I'm pretty sure he's talking about c) the "native" scrolling function (=scroll wheel on desktop) ;)

Riccardo, unfortunately I've no idea.

Dennis Zhao

You can set the _scrollTop of _element in the Layer object (try something like layer._element.scrollTop = x). If you need to actually have the scrolling, I'd look into libraries like velocity.js or jQuery.scrollTo

Rafael Puyana

ups :D Thanks Marc Krenn

Riccardo Zecchini

Yes, that's what I meant. Sort of the classic one-page-site with a fixed nav that scroll to every anchor. I just wondered if there was a straight forward Framer method w/out calling in jQuery.. Thank you guys! ;)

Read the entire post on Facebook