I have the following code example that calls .load() with the following syntax:
.load( url [, data] [, complete(responseText, textStatus, XMLHttpRequest)] )
Is there a simple way I can convert my call so I am using .ajax with this syntax:
.ajax( url [, settings] )
.load()is simply.get()that directly appends it’s contents to the attached element.Therefore, the
.ajax()version should be one that has a GET for it’s method, or in jQuery’s case,type:.ajax()return deferred objects, which explains the.done()in this code example.