title: TypeError: $.ajax(...) is not a function?
body: <p>I'm creating a simple AJAX request which returns some data from a database. Here's my function below:</p>
  <pre><code>function AJAXrequest(url, postedData, callback) {
      $.ajax({
          type: 'POST',
          url: url,
          data: postedData,
          dataType: 'json',
          success: callback
      });
  }
  </code></pre>
  <p>Here's where I call it, providing the required parameters:</p>
  <pre><code>AJAXrequest('voting.ajax.php', imageData, function(data) {
      // function body
  });
  </code></pre>
  <p>Yet, the callback does not run, and instead I get an error in the console:</p>
  <pre><code>TypeError: $.ajax(...) is not a function.
  </code></pre>
  <p>Why? I've done AJAX requests before where the success event triggers an anonymous function inside of $.ajax, but now I'm trying to run a separately-named function. How do I go about this?</p>