Skip to content

Instantly share code, notes, and snippets.

@arestov
Created October 31, 2009 20:50
Show Gist options
  • Save arestov/223239 to your computer and use it in GitHub Desktop.
Save arestov/223239 to your computer and use it in GitHub Desktop.
readyState == 1 (or any) for jquery
// readyState == 1 (or any) for jquery
var xhr = $.ajax(...);
xhr._onreadystatechange = xhr.onreadystatechange;
xhr.onreadystatechange = function() {
xhr._onreadystatechange();
if (xhr.readyState == 3) alert('Interactive');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment