domy-events
Map DOM events to DOM elements. For use with Browserify.
Part of the Domy module collection.
Install
npm install domy-events --save
Usage
var events = ; var handlers = { e; console; } { } { e; }; var eventsOptions = bind: handlers // optional parent: '.parent' // optional (can use a DOM object as well) delegate: true // optional; // Now, handle events;
Note: domy-events uses querySelectorAll
under the hood.
Options
bind
- the context in which to bind the event handler method toparent
- the parent DOM element for all css selections. Defaults todocument
.delegate
- delegate all events to the parent
Run Tests
Requires Phantomjs is installed
npm install
npm test