jQuery Ajax Methods

Beginner
7 min read
Updated: Nov 2026
24 method guides
Method index

About This Index

This page is the jQuery Ajax index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.

Learn the jQuery overview on /jquery. Use this page when you need an Ajax API such as $.ajax(), $.get(), or .load().

Beginner path.

Start with $.ajax(), then $.get() / $.post(), then .load() and $.param()—add ajaxStart / ajaxStop when you need a shared spinner.

How to Call an Ajax Method

Use $.ajax() for full control, or a shorthand—chain done() / fail() on the returned jqXHR:

jQuery
$.ajax({
  url: "/api/users",
  method: "GET",
  dataType: "json"
}).done(function (data) {
  console.log(data);
}).fail(function (xhr) {
  console.error(xhr.status);
});

$.get("/api/users", function (data) { /* … */ });
$.post("/api/users", { name: "Ada" });
$.getJSON("/api/users.json");
$("#panel").load("/partials/card.html");
$.param({ a: 1, b: [2, 3] }); // "a=1&b[]=2&b[]=3"

jQuery Ajax Methods Table

All Ajax method and event guides in this jQuery tutorial series (24 tutorials).

Core Ajax API

4 methods

Make HTTP requests with $.ajax() — the foundation behind $.get(), $.post(), and .load().

MethodDescriptionTutorial
$.ajax()Core Ajax call — configure URL, method, data, and dataType, then chain done(), fail(), and always() on jqXHR.Try it
$.ajaxPrefilter()Hook that runs before each $.ajax() — tweak options, abort duplicates, or filter by dataType.Try it
$.ajaxSetup()Set default Ajax options for later requests — prefer explicit options or a wrapper in new code.Try it
$.ajaxTransport()Register a custom send/abort transport — advanced path for non-standard dataTypes.Try it

Ajax Shorthands

5 methods

One-line helpers built on $.ajax() — GET, POST, JSON, script, and HTML injection.

MethodDescriptionTutorial
$.get()GET shorthand for $.ajax() — pass url, optional data, success callback, and dataType.Try it
$.post()POST shorthand for $.ajax() — send body data with url, data, success, and dataType.Try it
$.getJSON()GET JSON shorthand — dataType json is preset so the success callback receives parsed data.Try it
$.getScript()GET script shorthand — load and run a remote .js file (dataType script).Try it
.load()Fetch HTML and inject it into matched elements — optional fragment selector after a space in the URL.Try it

Ajax Utilities

3 methods

Serialize data for query strings and request bodies before you call Ajax.

MethodDescriptionTutorial
$.param()Serialize objects, arrays, or form fields into a URL-encoded query string for Ajax or GET URLs.Try it
.serialize()Encode successful form controls as a query string — ready for $.post() or $.ajax().Try it
.serializeArray()Encode form controls as [{ name, value }, ...] — map or filter, then pass to $.param().Try it

Global Ajax Events

12 methods

Watch every qualifying request from one $(document) handler — start, send, success, error, complete, stop.

MethodDescriptionTutorial
ajaxStartDocument event when the first global Ajax request begins — pair with ajaxStop for a spinner.Try it
.ajaxStart()Legacy shorthand for binding ajaxStart — prefer $(document).on('ajaxStart', fn).Try it
ajaxSendDocument event that runs before each global Ajax request is sent.Try it
.ajaxSend()Legacy shorthand for binding ajaxSend — prefer $(document).on('ajaxSend', fn).Try it
ajaxErrorDocument event when any global Ajax request finishes with an error.Try it
.ajaxError()Legacy shorthand for binding ajaxError — prefer $(document).on('ajaxError', fn).Try it
ajaxSuccessDocument event when any global Ajax request completes successfully.Try it
.ajaxSuccess()Legacy shorthand for binding ajaxSuccess — prefer $(document).on('ajaxSuccess', fn).Try it
ajaxCompleteDocument event when any global Ajax request finishes — success or error.Try it
.ajaxComplete()Legacy shorthand for binding ajaxComplete — prefer $(document).on('ajaxComplete', fn).Try it
ajaxStopDocument event when the last global Ajax request completes — hide loading UI here.Try it
.ajaxStop()Legacy shorthand for binding ajaxStop — prefer $(document).on('ajaxStop', fn).Try it

Frequently Asked Questions

They load data from the server without a full page refresh: core $.ajax(), shorthands like $.get() and $.post(), HTML injection with .load(), serializers like $.param() and .serialize(), plus global document events (ajaxStart through ajaxStop).
Use $.get() or $.post() for simple requests. Reach for $.ajax() when you need headers, custom methods, timeouts, converters, or fine-grained beforeSend control—the shorthands call $.ajax() under the hood.
Since jQuery 1.9, bind on document: $(document).on('ajaxComplete', fn). Set global: false on a single $.ajax() call to skip those events for that request only.
ajaxComplete is a global document event for every qualifying request. .always() runs only on that one jqXHR. Use global events for site-wide spinners; use .always() for per-request cleanup.
Start with $.ajax(), then $.get() / $.post(), then .load() and $.param(). Add ajaxStart / ajaxStop when you need a shared loading indicator.

Start with $.ajax()

Open the core Ajax guide—syntax, examples, and FAQs.

$.ajax() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

16 people found this page helpful