title: Uncaught ReferenceError: $ is not defined (ajax)
body: <p>I have this error on a simple jsp : 
  Uncaught ReferenceError: $ is not defined  </p>
  
  <p>I've just try to recall a service rest on another project on eclipse but it seem doesn't work..</p>
  
  <p>Code is here : </p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
      &lt;script rel="javascript" type="text/javascript" href="js/jquery-1.11.3.min.js" /&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;script&gt;
          var people = {
              "address": "Street 12",
              "name": "twelve",
              "id": 12,
              "surname": "twelve"
          };
  
          function sendobject() {
              $.ajax({
                  type: "POST",
                  url: "http://localhost:8080/HibernateTutorialWeb/rest/person/post",
                  data: markers,
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function(data) {
                      alert(data);
                  },
                  failure: function(errMsg) {
                      alert(errMsg);
                  }
              });
          }
      &lt;/script&gt;
      &lt;input type="button" onclick="sendobject()" value="send"&gt; &lt;/input&gt;
  
  
  &lt;/body&gt;
  &lt;/&lt;html&gt;
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>Tried using the jQuery from Google CDN, but still doesn't work</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <blockquote>
    <p>Uncaught ReferenceError: $ is not defined sendobject 
    @ index.jsp:15onclick @ index.jsp:28</p>
  </blockquote>
  
  <hr>
  
  <p><strong>This question is not a duplicate of <a href="https://stackoverflow.com/questions/2075337/uncaught-referenceerror-is-not-defined">Uncaught ReferenceError: $ is not defined?</a></strong> </p>
  
  <p>Because all the answer of that question suggest <em>to put the references to the jquery scripts first</em>, but <strong>it does not work for me</strong> .</p>
  
  <p><a href="https://stackoverflow.com/a/33626543/5533075">The right solution was given in tushar's answer</a></p>
  
  <p>So it's a <strong>similar</strong> question with a <strong>different problem</strong> and <strong>different solution.</strong></p>
  
  <hr>