scrolltome

1.0.2 • Public • Published

scrolltome

Library to manage if an element is in ViewPort

  1. Install
npm install scrolltome
  1. Usage
scrolltome.subscribe({
    element: document.getElementById('section1'),
    inViewPortHandler: (data) => console.log(data),
    outOfViewPortHandler: (data) => console.log(data),
    repeat: 'FIRST_OUT',
});
  1. Development
npm run dev

This watches files and compiles them

  1. Run tests
npm run dev
npm start // or node server.js
npm test

npm run dev should be running to watch and recompile files.

Readme

Keywords

none

Package Sidebar

Install

npm i scrolltome

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

97.6 kB

Total Files

27

Last publish

Collaborators

  • castrofernandez