Very simple JavaScript only approach to determine whether a user is scrolling ⬆️ or ⬇️
Copy lines 1 - 21 of scrollDirection.js
and paste them into your document's <script></script>
tag. Edit line 15 to apply the desired action, function, style, etc when a user scrolls up. Edit line 17 to apply the desired action, function, style, etc when a user scrolls down.
- JavaScript
- Ashley Hartt 👤 atlanticashley
This project is licensed under the MIT License - see the LICENSE.md file for details