title: Getting "Uncaught reference error: $ is not defined" - scripts are loading in correct order - and works from console
body: <p>I'm getting an Error:</p>
  
  <blockquote>
    <p>"Uncaught ReferenceError: $ is not defined" </p>
  </blockquote>
  
  <p>when trying to use <code>$('#someid')</code> within my custom js code within an electron app.</p>
  
  <hr>
  
  <p>The scripts are in the correct order in my html file:</p>
  
  <pre><code>&lt;script type="text/javascript" src="assets/js/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="assets/js/popper.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="mymidi.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This happens if i attempt to use on one of the first lines of <code>mymidi.js</code>:</p>
  
  <pre><code>console.log($('#mappingnotify').innerText);
  </code></pre>
  
  <p>or for an event that is created later during a dom-element creation:</p>
  
  <pre><code>function pickdev(){...
  midiinput.on('noteon',function(msg){
  ...
    $('#mappingnotify').modal('show');
  ...})}
  </code></pre>
  
  <p>the strange thing is it seems to work correctly from the console:</p>
  
  <pre><code>console.log($('#mappingnotify').innerText);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>VM113:1 
  kalsjhdf
  Cancel
  </code></pre>
  
  <p>So to me, it seems that it has something to do with <code>$</code> not being loaded when called... but I'm at a loss as to what, or how to fix it.</p>