When targeting a collection of input elements, you can have the number format plugin automatically format the users input based on your format settings.
$('input.number').number( true, 2 );
Passing true to the number parameter, indicates that you want the value of the field or element to be effected, instead of placing the passed number into the field or element. All other parameters are as decribed above.
When the user types, their input will automatically be converted in the correct format. This also attaches .val() hooks which allow you to continue using .val() to set your input elements, and you don't need to worry about handling the formatting.
Automatic paste formatting is also supported.
Writing numbers into an element
$('.selector').number( 1234, 2 ); // Changes the text value of the element matching selector to the formatted number.
Formatting numbers within a collection of elements