What is it?
GlobalMoneyInput is a jQuery plugin to provide an easy way to input money values. All you need is to include. you can apply a mask to input localized money data based on Microsoft's jQuery Global plugin.
It was built using the jQuery library and the Microsoft Gobal jQuery plugin.
Licensed under both MIT and GPL licenses
Example
Advantages
- Automatic format selection - you don't need to know how is the currency format and symbol in other countries.
- Customizable - You can enable or disabe the automatic display of currency symbol
- Support for more than 350 cultures
Quick start
- Import jQuery lib
- Import Microsoft jQuery Global plugin
- Import GlobalMoneyInput plugin
- Initialize:
$('#youtInputField').maskMoney();
- You're done!
For newbies
Help me! I've never heard about jQuery, I'm a Javascript begginner!
Ok, ok... but I'll assume that you know HTML, ok?
Let's go:
- Download the full bundle file: jquery.GlobalMoneyInput-1.0-with-libs.zip
- Extract to your project path
- Edit you HTML head to import the files
- Initialize (replace the "youtInputField" text below to your input field id):
$(function($){
/* Init Global Plugin with Brazilian Portuguese configuration */
var cfgCulture = 'pt-BR';
$.preferCulture(cfgCulture);
$('#youtInputField').maskMoney();
});
- You're done!
Tips
- To always have the latest version working on your project, just point to http://globalmoneyinput.googlecode.com/svn/trunk/jquery.GlobalMoneyInput.js. It saves bandwith and you'll be always updated! :P
- You can use the same tip to import jQuery lib, just point to http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js