JM
Jet Movement detects scrollUp and scrollDown movement for you.
Introduction
// 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.
HTML:
Jet Movement
CSS:
JavaScript:
const header = documentjmnavbarHeight = headerclientHeight jm jm
Inspired by Hide header on scroll down, show on scroll up.
License
MIT.