up-down
A quantity selector written in ES6.
Install
npm i up-down --save
Usage
Markup
- +
Instantiate
const el = documentconst counter = countercountercounter
Style (optional)
See dist/up-down.css
for styles, or style as you wish.
Destroy An Instance
Destroy an instance and all handlers.
counter
Get Count
The current count is always available on the instance.
countercount
Dependencies
- knot.js: A browser-based event emitter, for tying things together. By @callmecavs
- closest: Find the closest parent that matches a selector. By @ForbesLindesay
TODO
- Allow user to pass min/max values to instance to override the native min/max attributes
- Allow custom markup? Or at least give selector classes to allow markup to be changed.