scroll.js is a JavaScript library for scrolling web pages.
Scrolls web pages smoothly. Works around the quirks of keydown events.
A live demo can be found in Krabby.
Add scroll.js
to your project.
Example with modal.js:
const scroll = new Scroll
modal.map('Command', ['KeyJ'], ({ repeat }) => scroll.down(repeat), 'Scroll down', 'Scroll')
modal.map('Command', ['KeyK'], ({ repeat }) => scroll.up(repeat), 'Scroll up', 'Scroll')
You can find some examples in Krabby.
See the source for a complete reference.
- Saka Key (@eejdoowad) for the initial implementation.
- @AdamWagner for his work in #1 to unify scrolling mechanisms.