Preferably using jquery. I found articles on a toaster, but I didn’t get a working version, I decided to ask more specifically here. $ (window) .scrollTop () - allows you to track how much scrolled down, but I do not understand how to use this function to find out if you are turning up or down.
I understand humanly that this should work like this:
- If scrollTop ()> current position, then DOWN.
- If scrollTop () is <current position, then UP.
It is not clear how to register the current position.