https://github.com/mathiasbynens/jquery-oninput
My `oninput` polyfill as a jQuery plugin
https://github.com/mathiasbynens/jquery-oninput
Last synced: about 2 months ago
JSON representation
My `oninput` polyfill as a jQuery plugin
- Host: GitHub
- URL: https://github.com/mathiasbynens/jquery-oninput
- Owner: mathiasbynens
- License: gpl-2.0
- Created: 2011-06-06T12:33:31.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2013-05-30T14:21:39.000Z (about 12 years ago)
- Last Synced: 2025-04-12T09:57:17.210Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://mathiasbynens.be/notes/oninput#comment-1
- Size: 102 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE-GPL.txt
Awesome Lists containing this project
README
# [HTML5 `oninput` polyfill](http://mathiasbynens.be/notes/oninput) as a jQuery plugin
## Example Usage
### HTML
``` html
```
### jQuery
``` js
$('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](http://mathiasbynens.be/)