1.1.0 • Published 8 years ago

scroll-event v1.1.0

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

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