Easy Number Formatting Plugin with jQuery - number
File Size: | 14.3 KB |
---|---|
Views Total: | 24286 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

number.js is a jQuery plugin that easily converts input elements your users input in the correct format for further using. This plugin supports returning the formatted number, while retaining the original .text()-like functionality.
You might also like:
- Easy Numbers and Currency Formatting Plugin - autoNumeric
- Input Field Data Formatting Plugin - Mask
- Price Format jQuery Plugin - Price Format
Basic Usage:
1. Markup
<form name="form1" method="post" action=""> <label for="textfield"><strong>Demo For number.js</strong></label> <input name="textfield" type="text" class="number"> </form>
2. Include jQuery library and number
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="jquery.number.min.js"></script>
3. Call the plugin (Format the numbers to 2 decimal places)
<script> $('input.number').number( true, 2 ); </script>
Change Logs:
2015-05-09
- Fix rounding bug
2015-02-10
- Check if origHookSet is a function before calling
2014-09-11
- Update jquery.number.js
2014-09-08
- Fixed negative usage & caret order behaviour
v2.1.3 (2013-08-16)
- Fixed a first entry bug with 'Zero' and decimal entries
v2.1.2 (2013-08-13)
- bugs fix
This awesome jQuery plugin is developed by customd. For more Advanced Usages, please check the demo page or visit the official website.