0.4.1 ā€¢ Published 8 years ago

scrollin v0.4.1

Weekly downloads
55
License
MIT
Repository
github
Last release
8 years ago

Install

Use

Scrollin.track(document.querySelector('#hi'), () => alert('hi!'))

Options

You can specify optional offset params to control when an elements is considered in the "viewport".

Scrollin.track(document.querySelector('#hi'), () => alert('hi!'), {
  top: 10,
  right: -10,
  bottom: 10,
  left: 10
})

API

  • Scrollin.track(document.querySelector('#hi'), () => alert('hi!'))
  • Scrollin.track(document.querySelectorAll('.hi'), () => alert('hi!'))
  • Scrollin.untrackAll()
  • Scrollin.untrack(document.querySelector('#hi'))
  • Scrollin.checkForVisibleElements()
  • Scrollin.getTracking()

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

šŸ“œ

Build Status

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago