Skip to content

digitaledgeit/js-input-event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

input-event

Make your input events work in IE8-9 too.

Install

component install digitaledgeit/js-input-event

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

var events = require('input-event');
var el = document.querySelector('input[type=text]');

events.bind(el, function() {
	console.log('Input text has changed!');
});

License

The MIT License (MIT)

Copyright (c) 2014 James Newell

Adapted from a jQuery plugin by Ben Alpert.