Easy Numbers and Currency Formatting Plugin - autoNumeric

Easy Numbers and Currency Formatting Plugin - autoNumeric
File Size: 47.2 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

How to start using jQuery?

More in this category...

View our Recommended Plugins

TOP 100 jQuery Plugins 2013

autoNumeric is an useful jQuery plugin for international currency formatting as well as numbers formatting. It supports almost all the major international numeric formats and currency signs used in Europe, North and South America, Asia and India.

You might also like:

How to use (Use both HTML5 data and options.):

1. Include the latest jQuery library and autoNumeric.js

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"> </script>
<script src="autoNumeric-1.8.8.js" type=text/javascript> </script>

2. Create a input field with HTML5 data for the German Euro

  <input type="text" id="DEMO" data-a-sign="€ " data-a-dec="," data-a-sep=".">

3. Call the plugin

 jQuery(function($) {

Change Log:

v1.9.21 (2014-04-01)

  • Mod to checkValue function to handle empty string - thanks to jedichenbin.
  • If CHF rounding is used decimal is automatically set to 2 places

v1.9.20 (2014-03-31)

  • increase vMax default value

v1.9.19 (2014-03-24)

  • fix format of text elements on pageload

v1.9.18 (2013-12-04)

  • fix format of text elements on pageload

v1.9.17 (2013-09-28)

  • Fixed leading zero on page load

v1.9.14 (2013-09-12)

  • Bug fix on checkValue function

v1.9.14 (2013-8-6)

  • fixed bugs

v1.9.11 (2013-6-23)

  • fixed "get" method

v1.9.11 (2013-6-23)

  • Another mod to the 'set' method.
  • Fixed the 'set' method to handle page reload using the back button.

v1.9.9 (2013-6-23)

  • Fixed how non-input tags default value is handled. When the default is an empty string and aSign is not empty the return value is now and empty string.
  • Modified how default values are handled when the decimal character equals ',' comma. Your default value can now use either a a period '.' or comma ',' as the decimal separator
  • Modified the caret placement on focusin (tab in). If only the currency sign is visible the caret is placed in the proper location depending on the sign placement (prefix or suffix).

v1.9.8 (2013-5-20)

  • Changed bind / unbind to on / off.
  • added lastSetValue to settings - this saves the unrounded value from the set method - $('selector').data('autoNumeric').lastSetValue; - helpful when you need to change the rounding accuracy

For more Advanced Usages, please check the demo page or visit the official website.