🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

scrollin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrollin

Do something great when an element enters the viewport.

Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
60
-60.26%
Maintainers
1
Weekly downloads
 
Created
Source

Scrollin

scrollin

**Do something great when an element enters the viewport.**










Install

npm i scrollin

Use

Scrollin.track(document.querySelector('#hi'), {handler: () => alert('hi!')})

API

  • Scrollin.track(document.querySelector('#hi'), {handler: () => alert('hi!')})
  • Scrollin.untrackAll()
  • Scrollin.untrack(document.querySelector('#hi'))
  • Scrollin.checkForVisibleElements()

Dev

  • npm i
  • npm run dev

Building

  • npm run compile

Polyfill Caveats

  • You may need to polyfill window.requestAnimationFrame
  • You may need to polyfill Array.prototype.splice
  • You may need to polyfill Array.prototype.some

📜

Keywords

scroll

FAQs

Package last updated on 14 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts