X

Geertjan's Blog

jquery-stockquotes and Oracle JET

Geertjan Wielenga
Product Manager

Here's https://github.com/ajwhite/jquery-stockquotes integrated into an Oracle JET application:

Steps:

  1. Somehow download https://github.com/ajwhite/jquery-stockquotes, e.g., via Bower.
  2. In "main.js" include a reference:
     'jqueryui-stockquotes': 'libs/jquery-stockquotes/dist/jquery.stockquotes', 
  3. In your module, reference 'jqueryui-stockquotes' in your define block and in your "self.handleAttached" include the following:
      $('.stock-quote').stockQuote();
  4. In the view, include this:
        <h2>Apple:  <span class="stock-quote" data-symbol="AAPL"></span></h2>
    
        <h2>Bank of America:  <span class="stock-quote" data-symbol="BAC"></span></h2>
    
        <h2>Facebook:  <span class="stock-quote" data-symbol="FB"></span></h2>
    
        <h2>IBM:  <span class="stock-quote" data-symbol="IBM"></span></h2>
    
        <h2>Microsoft:  <span class="stock-quote" data-symbol="MSFT"></span></h2>
    
        <h2>Oracle:  <span class="stock-quote" data-symbol="ORCL"></span></h2>
    
        <h2>SalesForce:  <span class="stock-quote" data-symbol="CRM"></span></h2>
    
        <h2>Twitter:  <span class="stock-quote" data-symbol="TWTR"></span></h2>
  5. In the index page, reference the CSS:
         <link rel="stylesheet" 
               type="text/css" 
               href="js/libs/jquery-stockquotes/dist/jquery.stockquotes.css" />

And that's all!

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services