Is $.get of jquery asynchronous? Is $.get of jquery asynchronous? ajax ajax

Is $.get of jquery asynchronous?


Yes, $.get is asynchronous. From the documentation:

This is a shorthand Ajax function, which is equivalent to:

$.ajax({  url: url,  data: data,  success: success,  dataType: dataType});

...and as that doesn't have the async option, async defaults to true. (Note that async will be going away entirely in a future version of jQuery; it will always be true.)

If $.get is asynchronous then what's the point of $.ajax?

$.ajax gives you control over lot more options. $.get is just a shortcut.


$.get is simply a shorthand for:

$.ajax({  url: url,  data: data,  success: success,  dataType: dataType});


As stated by the jQuery documentation, $.get is a convenience wrapper for the more low-level $.ajax.