title: How do I reference jQuery from my HTML/JavaScript application?
body: <p>I keep getting <code>Uncaught ReferenceError: $ is not defined</code> error.
  I assume everything is ok and working. My JQuery code is inside my Javascript file. I assume that isn't how it works? Should I have a JQuery file?</p>
  
  <p>I have this inside the head of my HTML
  <code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"&gt;&lt;/script&gt;</code></p>
  
  <p>This is my Javascript file:</p>
  
  <pre><code>function typing(id, sentence){
  var result = $.Deferred();
      var index=0;
      var intObject= setInterval(function() {
          document.getElementById(id).innerHTML+=sentence[index]; 
          index++;
          if(index==sentence.length){
              clearInterval(intObject);
          }
      }, 100);
      return result.promise();
  }
  
  var sleep = function(ms) {
      var result = $.Deferred();
      setTimeout(result.resolve, ms);
      return result.promise();
  };
  
  typing('container','Subject Name:').then(function() {
        return sleep(500);
      }).then(function() {
        return typing('container',' Carlos Miguel Fernando')
      });
  </code></pre>
  
  <p>Where did I go wrong?</p>