Jet Movement detects scrollUp and scrollDown movement for you.
// when you scroll the page up it excutes the function `fn`jm// when you scroll the page down it excutes the function `fn`jm
A real-world example
Auto hiding website's Navbar when scroll down and show when scroll up, see it alive.
const header = documentjmnavbarHeight = headerclientHeightjmjm
Inspired by Hide header on scroll down, show on scroll up.