The scrollEvents API has managed not to change since the
0.4.0 release, although we have expanded it with lots of goodies.
Let's looks at a simple example:
scrollEvents.changeClass(".foo", "not-scrolled", "scrolled");
In this case we are changing the class after scrolling 10 pixels or more (measured by
10 is the default
That is just the tip of the iceberg though! Check out the API docs to get all the fancy notes.
How do I use it?
scrollEvents is available via RawGit CDN (version
Minified (under 3kB!):
If you want to play with
scrollEvents you can fork this fiddle:
Pull requests and issues are always welcome.