title: $ is not defined - jquery
body: <p>I am new to JQuery and get thefollowing error messages:</p>
  
  <pre><code>ERROR: '$' is not defined. [no-undef]
  ERROR: 'location' is not defined. [no-undef]
  </code></pre>
  
  <p>For completeness, I have added all the code from the two relevant pages down here. </p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;title&gt;Fruits Game&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content = "width = device-width, initial-scale =1, user-scalable = yes"&gt; 
      &lt;link rel="stylesheet" href="styling.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;Irrelevant content here&lt;/div&gt;
  
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>jquery.js</strong></p>
  
  <pre><code>var playing = false;
  
  $(function(){
  //click on start reset button
      $("#startreset").click(function(){
          //We are playing
          if(playing == true){
              location.reload();
          }else{
              //We are not playing
              playing = true;
          }
      })
  });
  </code></pre>
  
  <p>I have tried many solutions from: <a href="https://stackoverflow.com/questions/2194992/jquery-is-not-defined">JQuery - $ is not defined</a>, yet none seem to solve my problem. Who can tell me what I am doing wrong?</p>