title: jade/pug select form javascript onchange event
body: <p>With a select form in Jade, I would like to run a javascript script when the selected is changed. This is my jade file:</p>
  
  <pre><code>block content
  
    script(type='text/javascript' src="../static/js/form.js")
  
    label(for="category") Category
    select(name="category").form-control
      option(value="") -- Select Category --
      option(value="trees") Trees
      option(value="fruit") Fruit
      option(value="cars") Cars
  </code></pre>
  
  <p>And this is my simple javascript file:</p>
  
  <pre><code>jQuery(document).ready(function () {
      $('category').change(function (e) {
          var value = $('category').val();
          console.log(value);
      });
  });
  </code></pre>