jQuery Plugin To Display Stock Quotes On Your Website - stockQuotes

jQuery Plugin To Display Stock Quotes On Your Website - stockQuotes
File Size: 15.3 KB
Views Total: 3157
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

stockQuotes is a lightweight jQuery plugin that displays a stock symbol and negative / positive changes of a company’s stock using markitondemand's Market Data API V2.

How to use it:

1. Include the jQuery library and the jQuery stockQuotes plugin's JavaScript and CSS on your webpages.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="dist/jquery.stockquotes.js"></script>

2. Use data-symbol attribute to specify the stock symbols as displayed below.

<span class="title">Twitter:</span>
<span class="stock-quote" data-symbol="TWTR"></span>

3. Just call the function and the plugin will do the rest.

$('.stock-quote').stockQuote();

4. All configuration options with default values.

$('.stock-quote').stockQuote({

  // CSS class for positive changes
  positiveClass: 'up',

  // CSS class for negative changes
  negativeClass: 'down',

  // CSS class for change arrow
  changeClass: 'change',

  // CSS class for quote
  quoteClass: 'quote',

  // Decimal precision of change
  precision: 2,

  // If the symbol should be added to the output
  includeSymbol: true
  
});

This awesome jQuery plugin is developed by ajwhite. For more Advanced Usages, please check the demo page or visit the official website.