0.2.0 • Published 10 years ago
@digitaledgeit/input-event v0.2.0
input-event
Make your input events work in IE8-9 too.
Installation
Browserify:
npm install --save @digitaledgeit/input-eventComponent:
component install digitaledgeit/js-input-eventUsage
var events = require('input-event');
var el = document.querySelector('input[type=text]');
events.bind(el, function() {
console.log('Input text has changed!');
});Methods
.bind(el, callback, capture)
Start listening for input events on an <input type="text|password"> element.
.unbind(el, callback, capture)
Stop listening for input events on an <input type="text|password"> element.
Note: This functionality is not yet implemented in IE8-9. Please raise an issue if you require it.
Example
Run browserify index.js -r ./index.js:input-event > build/build.js and open example.html.
License
The MIT License (MIT)
Copyright (c) 2014 James Newell
Adapted from a jQuery plugin by Ben Alpert.
0.2.0
10 years ago