Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

number


Formating your number

With this plugin you can format numbers in different ways.
Just say how many decimals you need, the decimal separator, thousand separator and a symbol if you wish.
Easy to use to format a currency and use to print the number friendly.

How to use it:
var formated_value = $().number_format(final_value);

Advanced:
var formated_value = $().number_format(final_value, {
     numberOfDecimals:3,
     decimalSeparator: '.',
     thousandSeparator: ',',
     symbol: 'R$'});

jQuery Format

The jQuery Format plugin enables the formatting and parsing of dates and numbers. It's a client-side alternative of the popular SimpleDateFormat and NumberFormat APIs.

Parse

This small plugins provides a simple function that evaluates a string to a primitive value (if possible).

Supported primitives:

  • Numbers: Supported formats
    • Integers f.e: 1
    • Floats f.e: 1.5
    • Hexadecimal f.e: 0xFF
    • Exponential notation f.e: 1e5

    All these formats support negative values as well.

  • Booleans: Supports "true" and "false"
  • Strings: Unrecognized strings are returned without any modification.

jQuery spinbox form element

Converts a textbox into a spinner control without adding any mark-up to the page. Provides a handy ui field for selecting numeric input.
(The appearance of the up/down buttons is provided by a background image sprite)

$("INPUT.spinbox").spinbox();
$("INPUT.spinbox").spinbox({
  min: 0,    // Set lower limit or null for no limit.
  max: 100,  // Set upper limit or null for no limit.
  step: 0.5, // Set increment size.
});

The spinbox() method accepts a hash of options such as min and/or max to limit the spinner value and step to specify the size of the increments. Accepts keyboard control via up and down keys as well as mouse wheel (in addition to typing into the text box as normal). Specify bigStep option to apply larger increments when page up or page down is pressed or when the Shift button is held down

autoNumeric

International numeric and currency formatting made easy

" ₩ith In₮€r₦a₮io₦£ ₡urr€₦¢¥ $¥mbo₤ $u₱₱or₮"

The client can only enter numeric values and decimal separator - plug-in automatically places a thousand separator as they type.

Supports multiple international numeric and currency formats including those used in most of Europe, North and South America, Asia and India's (lakhs). The varied formats are controlled by a simple META DATA code that is placed in the input tag. Whole numbers and decimal accuracy are defined in this code. This plug-in also allows multiple formats to reside on the same page.

Supports nine different rounding methods (Round-Half-Up Symmetric & Asymmetric, Round-Half-Down Symmetrical & Asymmetric, Round-Half-Even "Bankers Rounding", Round Up, Round Down, Round to Ceiling & Round to Floor)

jField - number textbox

It makes a textbox accept only numbers, positive, decimal etc., as specified in the options.

<script type="text/javascript">
$(document).ready(function(){
$("#text").jField({
allowNegatives: false,
allowDecimal: true
});
});
</script>

jQuery romanToArabic

This plugin validates Roman numerals, as well as converting them to arabic numbers.

To call convert(): $(this).romanToArabic.convert("MMMCMXCIX");
To call validate(): $(this).romanToArabic.validate("MMMCMXCIX");

validate() returns true if the number is a legal Roman numeral.
convert() returns the Roman numeral converted to an int.

  1. Note that this plugin breaks chaining by returning true/false for validate() and a number for convert().
  2. For reasons of speed, convert() assumes that the input is a legal Roman numeral, not just a valid Roman numeral.

Add Table Rows Count

This plugin automatically adds a column with row count. Thus making your tables more readable and keeping your markup/metadata clean.

The use:

$('.myTables').rowCount();

With options:

$('.myTables').rowCount( { name: "Count", cssClass: "columnCss" } );

Number formatter

jQuery plugin to format numbers using any number of precision digits, with thousands and decimal separators customizable.

  // Input
  <input type="text" class="numeric" value="" />
  // Brazilian currency format
  $(".numeric").number_format({precision: 2, decimal: ',', thousands: '.'});

  /* Results: number are formatted as they are typed
  123,45
  1.234,56*/

  // Changing precision to 5 decimal digits
  $(".numeric").number_format({precision: 5});

  /* Results: number are formatted as they are typed
  1,234.56789
  0.12345 */

  // Formatting any number
  $.number_format(12345, {precision: 2});

  /* Result: 123.45 */

  // Only positive numbers
  $.number_format(-789, {allow_negative: false});

  /* Result: 7.89 */

  // No precision digits
  $.number_format(123456, {precision: 0});

  /* Result: 123,456 */