title: jQuery in external file not working
body: <p>Just testing a calculator with some different functions. I got a problem when i move the code to an external js file and then trying to import it. The calculator will not run when i do it this way.</p>
  
  <p>HTML code:</p>
  
  <pre><code>  &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script type="custom.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;div&gt;&lt;input id="a1" type="text" value="0" min="0"/&gt;&lt;/div&gt;
      &lt;div&gt;Velg en:&lt;/div&gt;
      &lt;div&gt;Dårlig&lt;input type="checkbox" name="checkbox" class="checkbox_dårlig"&gt;&lt;/div&gt;
      &lt;div&gt;Normal&lt;input type="checkbox" name="checkbox" class="checkbox_normal"&gt;&lt;/div&gt;
      &lt;div&gt;Bra&lt;input type="checkbox" name="checkbox" class="checkbox_bra"&gt;&lt;/div&gt;
      &lt;select&gt;
          &lt;option disabled selected value&gt; -- Velg en type -- &lt;/option&gt;
          &lt;option id="test1"&gt;Test 1&lt;/option&gt;
          &lt;option id="test2"&gt;Test 2&lt;/option&gt;
          &lt;option id="test3"&gt;Test 3&lt;/option&gt;
          &lt;option id="test4"&gt;Test 4&lt;/option&gt;
          &lt;option id="test5"&gt;Test 5&lt;/option&gt;
      &lt;/select&gt;
      &lt;div&gt;Value: &lt;input id="pris" type="text" value="0" /&gt;&lt;/div&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(document).ready(function(){
      $('#a1').keyup(calculate);
      $(".checkbox_dårlig").change(calculate);
      $(".checkbox_normal").change(calculate);
      $(".checkbox_bra").change(calculate);
      $("select").change(calculate);
      $('input[type="checkbox"]').on('change', function() {
          $('input[type="checkbox"]').not(this).prop('checked', false);
          calculate()
      });
  });
  function calculate(e) { some code }
  </code></pre>
  
  <p>Can someone see where the problem is?</p>