Action based on scrolling up or down in Framer.js
<p>I'm a designer and very new to Framer.</p>

<p>Id like to be able to hide/show the navigation at the top of screen based on the direction the content below is scrolled. If I start to scroll down the page, the nav hides by moving up. And then the opposite.</p>

<p>Here's what I've been playing around with, but no luck so far. </p>

<p>scroll.on Events.Scroll, ->
    if scroll.scroll > scroll.scrollY then psd.subHead.animate
        properties:
            y: -50</p>

<pre><code>else scroll.scroll &lt; scroll.scrollY then psd.subHead.animate
    properties:
        y: 0
</code></pre>

<p>I suppose I want to move up if scroll position is less than the current position and down if it's greater.</p>

<p>Any help is much appreciated!</p>