@dankolz/scroll-watch
v1.0.0
Published
Watches elements and calls some code when they come into view
Downloads
2
Readme
Scroll Watch
Watches elements and calls some code when they come into view
Instal
npm i @dankolz/scroll-watch
Usage
const ScrollWatch = require('@dankolz/scroll-watch')
let sw = new ScrollWatch('.project-box', {
visibleBy: 300
})
sw.start()
By default, the handler code will add the class visible
to the element.