Quick Reference
This is a quick reference list of jQuery AJAX Methods that are used to exchange data with a server and update parts of the document without reloading.
- jQuery – $.ajax() MethodThe .ajax() method is used to perform an AJAX (asynchronous HTTP) request, and is mostly used for requests where the other methods cannot be used.
- jQuery – ajaxComplete() MethodThe ajaxComplete() method specifies a function to be run when an AJAX request completes.
- jQuery – $.ajaxSetup() MethodThe .ajaxSetup() method sets default values for future AJAX requests.
- jQuery – ajaxError() MethodThe ajaxError() method specifies a function to be run when an AJAX request fails, and should only be attached to the document.
- jQuery – ajaxStart() MethodThe ajaxStart() method specifies a function to be run when an AJAX request starts.
- jQuery – ajaxSend() MethodThe ajaxSend() method specifies a function to run when an AJAX requests is about to be sent., and should only be attached to the document.
- jQuery – ajaxStop() MethodThe ajaxStop() method specifies a function to run when ALL AJAX requests have completed.
- jQuery – ajaxSuccess() MethodThe ajaxSuccess() method specifies a function to be run when an AJAX request is successfully completed, and should only be attached to the document.
- jQuery – $.get() MethodThe .get() method loads data from the server using an HTTP GET request.
- jQuery – $.getJSON() MethodThe .getJSON() method is used to get JSON data using an AJAX HTTP GET request.
- jQuery – $.getScript() MethodThe .getScript() method is used to get and execute a JavaScript using an AJAX HTTP GET request.
- jQuery – load() MethodThe load() method loads data from a server and puts the returned data into the selected element.
- jQuery – $.param() MethodThe .param() method creates a serialized representation of an array or an object.
- jQuery – $.post() MethodThe .post() method loads data from the server using an HTTP POST request.
- jQuery – serialize() MethodThe serialize() method creates a URL-encoded text string by serializing form values.
- jQuery – serializeArray() MethodThe serializeArray() method creates an array of objects (name and value) by serializing form values.
jQuery Notes:
- To use jQuery on your site, it must first be downloaded from the official jQuery site and linked to in your document <head>, or linked to via a CDN in your document <head>
- It is generally good practice to place your jQuery code/function inside the document load function so that the action takes place ONLY after the document has finished loading
- When using jQuery, single or double quotation marks are acceptable and work identically to one another; choose whichever you prefer, and stay consistent
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.