I\'ve never heard of an event in jQuery called input till I saw this jsfiddle.
Do you know why it\'s working? Is it an alias for keyup or s
oninput event is very useful to track input fields changes.
However it is not supported in IE version < 9. But older IE versions has its own proprietary event onpropertychange that does the same as oninput.
So you can use it this way:
$(':input').on('input propertychange');
To have a full crossbrowser support.
Since the propertychange can be triggered for ANY property change, for example, the disabled property is changed, then you want to do include this:
$(':input').on('propertychange input', function (e) {
var valueChanged = false;
if (e.type=='propertychange') {
valueChanged = e.originalEvent.propertyName=='value';
} else {
valueChanged = true;
}
if (valueChanged) {
/* Code goes here */
}
});