Lets through only allowed characters for <input>
elements. Also works with pasting!
Requires jQuery 1.9
.
Run with tests: npm run
Should work on IE 9.
Download the production version or the development version.
In your web page:
<script src="jquery.js"></script>
<script src="dist/input-blocker.min.js"></script>
<script>
jQuery(function($) {
$('selector').inputBlocker({
canPaste: true,
allowedRe: /\d/,
maxlength: 10,
trimOnPaste: false
}); // "initializes input blocker with provided options"
});
</script>
(Coming soon)
(Coming soon)
V 1.00 released 15.08.2014. V 1.01 released 17.08.2014.