scroll-event

1.1.0 • Public • Published

scroll-event Build Status

Scroll event handler for value-event

Install

$ npm install --save scroll-event

Usage

var scrollEvent = require('scroll-event')
var h = require('virtual-dom/h')
 
h('div', {
  'ev-scroll': scrollEvent(scrollHandler)
})

API

scrollEvent(handler, [data]) -> function

handler

Required
Type: function

The handler to call when the element is scrolled.

data

Type: object
Default: {}

Data to pass to the handler when the element is scrolled. This will include x/y coordinates for the scroll position, the maximum scrollable distance ({maximum: {x, y}}), as well as custom properties you define.

License

MIT © Ben Drucker

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    2
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i scroll-event

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • bendrucker