title: How to resolve JavaScript error: "$ is not a function"
body: <p>I have a piece of javascript which is throwing an error on my Wordpress site:</p>
  <pre><code>    &lt;script type=&quot;text/javascript&quot;&gt;
  $.ajax({
  url: 'https://api.xxxxx.xxx/v1/identify',
  success: function(data){
      //show data in your browser console
      console.log(data);
  
      //example on how to replace an element in your page
      if(data.hasOwnProperty('name')) {
          $('.injected-header-text').html('Hi ' + data.name);
      }
  }
  });
  </code></pre>
  <p>```</p>
  <p>after looking through a few threads I have changed the $.ajax into jQuery.ajax and that makes the requested results visible in Chrome console but not visible in my browser.</p>
  <p>The error: JavaScript error: &quot;$ is not a function&quot;</p>
  <p>This is what i have so far:</p>
  <pre><code>         &lt;script&gt;
  jQuery.ajax({url: 'https://api.xxxx.xxx/v1/identify',
      success: function(data){
     //show data in your browser console
      console.log(data);
  
      //example on how to replace an element in your page
      if(data.hasOwnProperty('name')) {
          $('.injected-header-text').html('Welkom ' + data.name);
      }
      }
      });
      &lt;/script&gt;
      &lt;div class=injected-header-text &gt; &lt;/div&gt;
  </code></pre>