All Projects → mathiasbynens → jquery-oninput

mathiasbynens / jquery-oninput

Licence: other
My `oninput` polyfill as a jQuery plugin

Programming Languages

javascript
184084 projects - #8 most used programming language

HTML5 oninput polyfill as a jQuery plugin

Example Usage

HTML

<input>
<textarea></textarea>

jQuery

$('input, textarea').input(function(event) {
  // `this` is the DOM element
  // `event` is the jQuery event object
  alert(this.value);
  event.preventDefault();
});

Notes

  • Works in all A-grade browsers, including IE6. In case oninput is not supported, onkeydown is used instead.
  • This plugin doesn’t support event delegation.

License

This plugin is dual licensed under the MIT and GPL licenses, just like jQuery itself.

Author

Mathias Bynens

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].