Currency Converter

jQuery plugin that creates currency conversion widget


This is a jQuery plugin that creates currency conversion widget. This widget is flexible, customizable, and easily integratable in any site working on different platforms. Your website visitors can convert currencies using latest exchange rates.

Features

  • Flexible and customizable
  • Quick and easy integration
  • Support up to 164-171 currencies
  • 6 built-in themes
  • Live currency updates
  • Localization ready
  • Compatible with all major browsers
  • Fixer, Currency Layer, Open Exchange Rates API integration
  • Major browser support
  • ieIE 11
  • edgeEdge
  • firefoxFirefox
  • operaOpera
  • safariSafari
  • chromeChrome

Requirements

There are a few requirements you need to meet before you can utilise currency converter, the most obvious of which is the inclusion of the jQuery library. You can grab the latest version here.

Alternatively, you can include it via CDN.

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

I recommend version 3.6.

Examples

Currency Converter has many options you can pass at initialization process. Click here to find out all of them. Let's consider below several example.

Example #1

Common widget initialization.

HTML
<div id="currency-widget"></div>
JS
$(document).ready(function() { $("#currency-widget").currency(); });

Example #2

In the example below we set default amount to 20. We change default "from" and "to" currency to GBP and RUB. We also modify number of decimal places and disable loading image.

HTML
<div id="currency-widget"></div>
JS
$(document).ready(function() { $("#currency-widget").currency({ // Set amount to 20 quantity: 20, // Default "from" currency from: "GBP", // Default "to" currency to: "RUB", // The number of digits after the decimal point decimals: 2, // Disable loading image loadingImage: false, }); });

Example #3

In this example we define a group of popular currencies. We also change default "from" and "to" currency to GBP and JPY.

HTML
<div id="currency-widget"></div>
JS
$(document).ready(function() { var popular = [ "USD", "EUR", "RUB", "JPY", "GBP", ]; $("#currency-widget").currency({ fromPopular: popular, toPopular: popular, from: "USD", to: "EUR", }); });

Example #4

In the example below we change decimal point and thousands separator. We set quantity to 20000 to see separator configuration we applied.

HTML
<div id="currency-widget"></div>
JS
$(document).ready(function() { $("#currency-widget").currency({ // Amount quantity: 20000, // Decimal point separator decSep: ",", // Thousands separator thousandSep: ".", });

Themes

Currency Converter comes with 6 built-in styles that are ready to go, all you have to do is specify the stylesheet with your theme of choice.

<link type="text/css" rel="stylesheet" href="css/currency.default.css"> <link type="text/css" rel="stylesheet" href="css/currency.blue.css"> <link type="text/css" rel="stylesheet" href="css/currency.green.css"> <link type="text/css" rel="stylesheet" href="css/currency.lightblue.css"> <link type="text/css" rel="stylesheet" href="css/currency.red.css"> <link type="text/css" rel="stylesheet" href="css/currency.orange.css">

Purchase

If you like Currency Converter jQuery plugin and want to integrate it within your website, then consider possibility to purchase it. Click here for more information.