Reputation: 2811
In pure JS:
var xmlHttp = createXmlHttpRequestObject();
...
if (xmlHttp.readyState == 2) {...loading... message...}
if (xmlHttp.readyState == 4) {...display ajax response...}
What is the condition for readyState when using $ajax()
from jQuery? In other words, what is translated code to jQuery from pure JS above?
Upvotes: 0
Views: 200
Reputation: 2134
http://api.jquery.com/jQuery.ajax/
from the link: No onreadystatechange mechanism is provided, however, since success, error, complete and statusCode cover all conceivable requirements.
Upvotes: 1