I was wondering, how some modern websites know, whether I am scrolling. And if so, where “I am” at the moment on the page and then perform specific functions.
For example the page 9gag.com. On the right side is a green button “Y U No Signup?!”, when I scroll further down, so that this button disappears, something similar appears on the top of the page.
Another example is the title of every of the pictures. When I’m looking at them and scrolling down, the title “follows me”, but only until reaching the end of the particular picture, then it stops.
its easy.. for example with jquery you can call a function within .scroll() triggering whenever you start scrolling… just use .offset() from top or bottom and you have you position and can fire whatever you want