khalidsalomao / jquery-oninput

My `oninput` polyfill as a jQuery plugin

Home Page:http://mathiasbynens.be/notes/oninput#comment-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

My `oninput` polyfill as a jQuery plugin

http://mathiasbynens.be/notes/oninput#comment-1

License:GNU General Public License v2.0


Languages

Language:JavaScript 100.0%