All Projects → ajwhite → jquery-stockquotes

ajwhite / jquery-stockquotes

Licence: other
A stock quote jQuery plugin

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

jquery-stockquotes

License Build Status

jquery-stockquotes

Usage

Twitter:  <span class="stock-quote" data-symbol="TWTR"></span>
Facebook: <span class="stock-quote" data-symbol="FB"></span>
Google:   <span class="stock-quote" data-symbol="GOOGL"></span>
Netflix:  <span class="stock-quote" data-symbol="NTFLX"></span>
Yahoo:    <span class="stock-quote" data-symbol="YHOO"></span>
$('.stock-quote').stockQuotes();

Installation

Add the package via bower

bower install jquery-stockquotes --save

Link the resources

<link rel="stylesheet" type="text/css" href="/bower_components/jquery-stockquotes/dist/jquery.stockquotes.css" />
<script type="text/javascript" src="/bower_components/jquery-stockquotes/dist/jquery.stockquotes.js"></script>

Options

$('.stock-quote').stockQuotes({
  changeClass: 'change', // css class for change arrow
  quoteClass: 'quote', // css class for quote
  precision: 2, // decimal precision of change
  includeSymbol: true // if the symbol should be added to the output
});

Todo

  • configure additional display items (mkt cap, etc)
  • explore another API, as the current on rate-limits
  • unit tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].