atticoos / jquery-stockquotes

A stock quote jQuery plugin
16 stars 7 forks source link

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="https://github.com/atticoos/jquery-stockquotes/blob/develop/bower_components/jquery-stockquotes/dist/jquery.stockquotes.css" />
<script type="text/javascript" src="https://github.com/atticoos/jquery-stockquotes/raw/develop/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