@wearejust/scroll

Adds a class when scrolling past selected elements


Keywords
scroll, javascript
License
MIT
Install
npm install @wearejust/scroll@1.0.6

Documentation

scroll.js

Installation

npm install scroll.js --save-dev

Usage

var Scroll = require('scroll.js');

$(function() {
    Scroll.init();
});

With options

var Scroll = require('scroll.js');

$(function() {
    Scroll.init({
		active: 'active',
		delay: 200,
		delayHorizontal: 50,
		gap: 0.1,
		priority: 'scroll-priority',
		selector: '.scroll'
    });
});