This question already has an answer here:
I am little confused about in what scenario Ajax.load()
method is used and what scenario jQuery.ajax()
is used.
There are many AJAX method, I am mainly confused between ajax.load() and simple ajax
</div>
The load
function is specifically used for loading in content from another page, into an element on your current page.
The other two functions are general-ajax functions that jQuery provides. Also, .get()
is just shorthand for sending a $_GET
request via AJAX.