What are the various ajax functions available in Jquery ?

devquora
devquora

Posted On: Feb 22, 2018

 

Ajax allows the user to exchange data with a server and update parts of a page without reloading the entire page. Some of the functions of ajax are as follows:

$.ajax(): This is considered to be the most low level and basic of functions. It is used to send requests . This function can be performed without a selector.

$.ajaxSetup(): This function is used to define and set the options for various ajax calls.

For example.

$.ajaxSetup({
"type":"POST",
"url":"ajax.php",
"success":function(data){
$("#bar")
.css("background","yellow")
.html(data);
}
});

Shorthand ajax methods: They comprise of simply the wrapper function that call $.ajax() with certain parameters already set.

$.getJSON(): this is a special type of shorthand function which is used to accept the url to which the requests are sent. Also optional data and optional callback functions are possible in such functions.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    jQuery Interview Questions

    What is jQuery?

    jQuery is a lightweight JavaScript library which gives a quick and simple method for HTML DOM traversing and manipulati..

    jQuery Interview Questions

    What are the advantages of JQuery ?

    There are many advantages of JQuery. Some of them are :It is more like a JavaScript enhancement so there is no overhea..

    jQuery Interview Questions

    What are the different type of selectors in Jquery?

    There are 3 types of selectors in JqueryCSS Selector XPath Selector Custom Selector..