jQuery Plugin For Currency Converting And Formatting - benjamin.js
File Size: | 8.73 KB |
---|---|
Views Total: | 4021 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
benjamin.js a lightweight currency converting and formatting jQuery plugin which displays prices in different currencies using actual exchange rates via Fixer.io and/or WebServiceX. Supported currencies: AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, GBP, HKD, HRK, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, RUB, SEK, SGD, THB, TRY, USD, and ZAR.
How to use it:
1. Load the minified version of the jQuery benjamin.js plugin after jQuery JavaScript library as this:
<script src="//code.jquery.com/jquery.min.js"></script> <script src="dist/benjamin.js"></script>
2. Wrap the prices into wrapping elements as theses:
<span class="benjamin">£100.50</span> <span class="benjamin" data-oldbj="GBP" data-newbj="USD"> £100.50 </span>
3. Initialize the plugin and done.
$('.benjamin').benjaminjs();
4. Set the current currency used (to convert FROM) and the new proposed currency (to convert TO).
$('.benjamin').benjaminjs({ oldCurrency: 'GBP', newCurrency: 'EUR' });
This awesome jQuery plugin is developed by JamesParkNINJA. For more Advanced Usages, please check the demo page or visit the official website.