just-scroll.js
v1.0.0
Published
Scroll there and there, just scroll.
Readme
Just Scroll
Just Scroll is a javascript package for ease-out-in Scrolling in browsers, NO more than that.
Usage
- With npm
import justScroll from 'just-scroll';- With requirejs
require(['dist/just-scroll.umd.js'], function (m) {
var justScroll = m.default;
})Arguments
justScroll(el, scrollY[, options])
In options:
options.durationSeconds to wait until scrolling finished.
options.onFinishThe Event that is triggered when scrolling finish.
justScroll(el, y, { onFinish ( positionY, // Current scroll position scrollHeight // total height of the container ) { // some operations } })options.onScrollThe Event that is triggered at each pace while scrolling.
justScroll(el, y, { onScroll ( positionY, // Current scroll position scrollHeight // total height of the container ) { // some operations } })
