jQuery.ajax() Function

By: Dusty Arlia
Published on Thursday, December 5, 2013, 08:46 PM
Last Updated on Saturday, July 11, 2015 at 8:59 PM
Total Updates: 2

The jQuery.ajax() function is used to perform Ajax requests. All of jQuery's Ajax utilities invoke this function. This function takes one argument: the options object. The properties of this object control how the Ajax request is to be performed. Here is an example of a jQuery.ajax() function call:

jQuery.ajax() {
	type: "GET",		   //HTTP request method
	url: url, 		   //URL of the data to fetch
	data: null, 		   //no data to add to the URL
	dataType: "script",   //execute response as a script
	success: callback  	   //call this function when done