Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

My `oninput` polyfill as a jQuery plugin

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitattributes Tag the v0.1.0 release May 30, 2013
Octocat-spinner-32 .gitignore Tag the v0.1.0 release May 30, 2013
Octocat-spinner-32 LICENSE-GPL.txt Tag the v0.1.0 release May 30, 2013
Octocat-spinner-32 LICENSE-MIT.txt Tag the v0.1.0 release May 30, 2013
Octocat-spinner-32 README.md Tag the v0.1.0 release May 30, 2013
Octocat-spinner-32 jquery.oninput.js Tag the v0.1.0 release May 30, 2013
Octocat-spinner-32 jquery.oninput.min.js Tag the v0.1.0 release May 30, 2013
README.md

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

Something went wrong with that request. Please try again.