Skip to content
📜 A pure JavaScript library to do stuff on scroll events. LibreJS compliant.
Branch: gh-pages
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.jshintrc
API.md
LICENSE
README.md
app.js
favicon.ico
gulpfile.js
index.html
karma.conf.js
package.json
scrollEvents.js
scrollEvents.min.js
scrollEventsDemo.gif
style.css

README.md

scrollEvents 📜

A pure JavaScript library to get you up and running in no time with scroll events. ⚡️

Demo

=====

API ㊙️

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 window.pageYOffset, 10 is the default breakPoint).

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? :shipit:

scrollEvents is available via RawGit CDN (version 1.1.4).

Minified (under 3kB!):

<script src="https://cdn.rawgit.com/ryanpcmcquen/scrollEvents/ed99a21fba898faa6b6f9ff814be09ca45aac735/scrollEvents.min.js"></script>

https://cdn.rawgit.com/ryanpcmcquen/scrollEvents/ed99a21fba898faa6b6f9ff814be09ca45aac735/scrollEvents.min.js

=====

If you want to play with scrollEvents you can fork this fiddle:

https://jsfiddle.net/ryanpcmcquen/yc7oowrt/

Pull requests and issues are always welcome.

Enjoy!

You can’t perform that action at this time.