Easy Number Formatting Plugin with jQuery - number

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

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:

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">

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)

$('input.number').number( true, 2 );

Change Logs:


  • Fix rounding bug


  • Check if origHookSet is a function before calling


  • Update jquery.number.js


  • 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.