Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

RaphaelDDL/jquery.formatNumber

Repository files navigation

jquery.formatNumber

jQuery plugin for formatting numbers, good for currencies. Option to choose the cents and thousands digit. Defaults to US' 9,999.00.

Usage: $('.number').formatNumber();

This will make <span class="number">2932389423</span> for e.g., be formatted into <span class="number">29,323,894.23</span>.

##Options

//produces 29,323,894.23 (e.g. US standard)
$('.number').formatNumber({
  cents: '.',
  decimal: ','
});

//produces 29.323.894,23 (e.g. Brazil standard)
$('.number').formatNumber({
  cents: ',',
  decimal: '.'
});

About

jQuery plugin for formatting numbers, good for currencies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published