roll.js – Roll and Scroll Tracking

      

roll.js is a little js library (~8kb, no dependencies) to help you keep track of position, scrolling, and pagination.

For basic usage Simply create a new instance, specifying the viewport sizeand for DOM Usage keep track of scrolling in a DOM element, and then do pagination or animation based on scroll position.

Roll-and-Scroll-Tracking
Here’s a DOM scrolling demo

Here’s a Canvas demo