Scroll Points

Example

This could be used to trigger any class-based animation and JS callback on an element when scrolled into view. Scroll down to see an very basic example and code.


Installation

$ npm i -S storm-scroll-points

Usage

HTML

JS

Either import and initialise using a named import:

import ScrollPoints from 'storm-points';
            
ScrollPoints.init('.js-scroll-point');

Or async using storm-load.js, add the .standalone file to your project, then initialise using the global name:

Load('/content/js/async/storm-scroll-points.standalone.js')
.then(() => {
    ScrollPoints.init('.js-scroll-point');
});