Follow by Email

Tuesday, 28 October 2014

Format number or add comma separation using Jquery

<!-- Add below script CDN is to apply currency formmater using jquery -->

    <script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/1.4.5/numeral.min.js"></script>

Format

Numbers can be formatted to look like currency, percentages, times, or even plain old numbers with decimal places, thousands, and abbreviations.

var string = numeral(1000).format('0,0.00');
// '1,000.00'

Reference link: http://numeraljs.com/

0 comments:

Post a Comment


                                                            

 
Design by Abhinav Ranjan Sinha