A repository of over 1000 quality jQuery plugins

jQuery jQuery Currency Exchange List

jQuery Currency Exchange List is a jQuery Rate & Vote plugin.

Created by Aacimov

jQuery plugin for displaying currency exchange list based on HNB Exchange Rate Lookup by hnbex.eu

Not what you're looking for? Click here to view more Rate & Vote jQuery plugins

jquery-currency-exchange-list

jQuery plugin for displaying currency exchange list based on Croatian national bank (HNB) Exchange Rate Lookup by hnbex.eu. Plugin gets the currency list in JSONP using AJAX which makes possible using cross-domain requests from JavaScript directly from the user's browser.

Usage

Use this plugin to get Croatian national bank (HNB) currency exchange list for present day. You can easily format the displayed list of currencies using options described below. Plugin is using the API provided by hnbex.eu.

Implementation

  • Plugin is jQuery based so before attaching the plugin you have to add jQuery to your <head> tag
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>

  • Add the plugin script anywhere after jQuery in <head> tag
    <script type="text/javascript" src="currency-exchange-list.js"></script>

  • Create <div id="hnb"> in your template file

  • Attach the plugin to <div id="hnb"></div>
    $(document).ready(function() {
    $("#hnb").getCurrencyExchangeRates();
    });
  • If you want to use a different selector, just pass it in options parameter, like this:
    $("#hnb").getCurrencyExchangeRates({selector:'.my-currency-exchange-widget'});
  • By default (if no options added), displayed currencies are CHF, EUR, GBP, USD.

Options to customize the displayed currency list (currencyList,date)

  • If you wish to display your own set of currencies you can do it by adding options parameter (currencyList)

    Example for showing only EUR and USD:
    $(document).ready(function() {
    $("#hnb").getCurrencyExchangeRates({
        currencyList: ["EUR","USD"]
    });
    });
  • You can add following currencies: AUD, CAD, CZK, DKK, HUF, JPY, NOK, SEK, CHF, GBP, USD, EUR, PLN

  • If you wish to display table of currency exchange rates on a specified date you can use an option parameter (date)

    Example showing rates on a specified date:
    $(document).ready(function() {
    $("#hnb").getCurrencyExchangeRates({
        date: "yyyy-mm-dd"
    });
    });
  • Of course you can use both parameters (currencyList and date)

    Example showing EUR and USD on a specified date (2015-03-01)
    $(document).ready(function() {
    $("#hnb").getCurrencyExchangeRates({
        currencyList: ["EUR","USD"],
        date: "2015-03-01"
    });
    });

Fork

Feel free to improve the plugin and share your fork with the world :)



You might also like these other Rate & Vote jQuery Plugins

  • jQuery-Rate

    A simple jQuery plugin for creating graphical ratings

  • rateit.js

    Rating plugin for jQuery. Fast, Progressive enhancement, touch support, customizable (just swap out the images, or change some CSS), Unob...

  • ILikeIt

    iLikeIt! is a simple, proof of concept, image voting system packed as a jQuery plugin

License:

GNU GENERAL PUBLIC LICENSE