Curry - Currency Conversion DDM

Curry is a self contained, (almost) self generated currency converter for many different currencies.


Project Update

29th of August 2017
Curry has been updated to v0.8.3:
  • The yql api has become very unstable over the last few days and as a result Curry has now been rebased and is using the api.
  • Tested with the latest jQuery version v3.2.1.

Curry uses to fetch raw currencies and currently only supports INR, EUR, CAD, GBP, ILS.
Version 1.0.0 is coming soon will include all currencies supports and much more.
In the mean time a suggested alternative is a custom list or to use

Basic setup

<div id="my-element"></div>
<span class="price">$100</span>
$(function(){ // document ready alias
    $('#my-element').curry(); // init curry
Price: $100



Default is set up as .price

Sets which element you want the currency conversion to take place on.


If you want Curry to handle the currency change, set this to true.


Curry uses USD (US Dollars) as the base for it's conversion.
Change this option if you want the base to be calculated according to another currency (must be in the currency list).


You can add your own symbols to this list or overwrite the existing ones.
Curry will match up the currency key (GBP = £) with your symbol.


By default Curry uses the currency conversion figures found at
You can supply your own currency rates via an object where the key is the currency name and the value a number to use for the conversion.
Curry can also be used interchangeably with

var options = {
    target: '.price',
    change: false,
    base:   'USD',
    symbols: {
        'ILS' : '₪'
    customCurrency: {
        'USD': 1,
        'GBP': 0.67,
        'EUR': 0.42,
$(function(){ // document ready alias
    $('#my-element').curry( options ); // init custom options
Price: $100


Curry uses an external service and that service is not 100% reliable.
Please read more about it at if you have a high traffic site or need your data to be available with guaranteed up time.

You are reponsible for notifying anybody who uses Curry that any calculations or conversion are for informational purposes only.
By using Curry you agree that the developer of Curry is not responsible or liable for any miss information or issues resulting from the use of Curry for any purpose.


Just like any other jQuery plugin, the javascript goes just before the closing body tag and after a jQuery library call.
The following code simply generates the Curry ddm which by default targets a .price class, look to the right.

<div class="my-future-ddm"></div>
<div><span class="price">$200</span></div>


<script src="//"></script>
<script src="curry.js"></script>

$(function(){ // document ready
    $('.my-future-ddm').curry(); // startup curry

Price: $200


You can override Currys conversion event by setting change to false.

This can be achived with the following code:

$(function(){ // document ready
    $('.my-future-ddm').curry({ change: false }).change(function(){

        var selected = $(this).find(':selected'), // get selected currency
            rate ='rate'), // get currency rate
            currency = selected.val(); // get currency name

        console.log( currency, rate );


Changing targets

Curry can target any valid jQuery selector.
Simply use target and set it to point to your custom selector:

$(function(){ // document ready
        // Target is set to '.price' by default but can use any valid jQuery selctor
        target: '.hproduct .price'
Product Price: $2.99

Adding custom symbols

The default symbols that come with Curry are $ (USD), £ (GBP), € (EUR), ¥ (JPY).

You can replace these or add more by adding a setting called symbols with a hash map value.
For correct conversion consider using html entities.

        symbols: {
            'ILS' : '₪', // Add Shekel currency symbol. ( HTML entity code &#8362; )
            'GBP' : '₤'  // Replace GBP sign. ( HTML entity code &#8356; )
Product Price: $2.99

Adding custom curency values

If you don't want to use curry's currency rates you can supply your own currency rates object.

Keep in mind that if you set yor rates according to another base or if USD is not included. You must set the base manually using the base property:

        base:   'EUR',
        customCurrency: {
            'EUR': 1,
            'GBP': 0.8013,
            'USD': 1.27
Price: €200

comments powered by Disqus

© 2017. Curry is distributed under the MIT or GPL license.

Curry was developed by NetYou.