title: Getting value from a console.log to html
body: <p>The function I have written works fine and the value correctly writes to my terminal onSubmit, however I'm struggling to piece together why this code isn't updating my html.</p>
  
  <pre><code>router.post('/index', function(req, res, next) {
  
    // ...Get form values, do calculations to get toCost value.
  
        console.log('$' + toCost);
  
        $(document).ready(function() {
          var output = document.getElementById('cost');
          output.innerHTML = toCost;
        });
  
    res.location('/');
    res.redirect('/');
  })
  </code></pre>
  
  <p>I receive the following error and jquery is loading fine.</p>
  
  <pre><code>$ is not defined
  </code></pre>
  
  <p>Admittedly this is an over-engineered node/express app. The code snippet lives wrapped in a route file, inside a post request. </p>
  
  <p>How do I get my value onto the html?</p>
  
  <p>Jade layout</p>
  
  <pre><code>extends layout
  
  block content
    form(...)
    div#cost
  </code></pre>