How to start event when user scrolls?

I want a image to fade away from the header when the user scrolls down, and when he makes it back to the top of the page, the image fades back in. How can it be done?

you might be able to add a shadow to your header so when the image passes underneath it’ll look like its fading out and when you scroll back up itd have the same effect but in reverse.

That is a smart alternative, but it wouldn’t works as I am using it for a floating group. There is actually a function to see what is the users current scroll position. Here is how I did it.


I then made a condition in the header to make it fade away and fade back in.

This topic was automatically closed after 70 days. New replies are no longer allowed.