Easy Numeric Input Plugin With jQuery - numeric.js

File Size: 4.65 KB
Views Total: 12863
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Easy Numeric Input Plugin With jQuery - numeric.js

numeric.js is an easy-to-use jQuery plugin which permits only numeric values being entered into an input field. Supports both positive and negative values.

See also:

How to use it:

1. Load the JavaScript file jquery.numeric.js after loading jQuery library.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="jquery.numeric.js"></script>

2. Active the plugin on your input field.

$('input').numeric()

3. Disable the negative values.

$('input').numeric({
  negative: false
})

Changelog:

2020-07-07

  • Fixed "undefined" compatibility with IE11

2020-05-26

2019-01-07

  • Support valueAsNumber(null)

2018-08-19

  • Use deep feature detection (avoid bugs in Edge)

This awesome jQuery plugin is developed by danielgindi. For more Advanced Usages, please check the demo page or visit the official website.