title: adding javascript script from handlebars
body: <p>I have been following an excellent tutorial for creating a shopping cart in <code>node.js</code>
  But I have hit a snag, and I have read and re-read the code and can't see what I have done wrong.</p>
  
  <p>Basically I have an <code>hbs</code> file called: <code>checkout.hbs</code> and at the bottom of the page I have these 2 entries:</p>
  
  <pre><code>&lt;script type="/text/javascript" src="javascripts/checkout.js"&gt;&lt;/script&gt;
  &lt;script type="/text/javascript" src="https://js.stripe.com/v2/"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I have a public folder in my project with a javascripts folder and a <code>checkout.js</code> file in there.</p>
  
  <p>However when I click the submit button it seems to ignore the javascript file and go straight to the post. I tried putting some random code in the <code>checkout.js</code> file to see if it crashed, but it didn't which suggests its not even trying to use the script and I am not sure why.</p>
  
  <p>checkout.hbs - <strong>should get checkout-form using id in checkout.js</strong></p>
  
  <pre><code>&lt;form action="/checkout" method="post" id="checkout-form"&gt;
  </code></pre>
  
  <p>checkout.js</p>
  
  <pre><code>var $form = $('#checkout-form');
  $form.submit(function (event) {
  </code></pre>