Skip to content

Instantly share code, notes, and snippets.

@jdlrobson
Created August 16, 2010 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdlrobson/526865 to your computer and use it in GitHub Desktop.
Save jdlrobson/526865 to your computer and use it in GitHub Desktop.
jQuery.ajaxSetup({
beforeSend: function() {
console.log("in global ajax beforeSend");
}
});
console.log("Request one");
var ajax = ajaxReq({
url: "/",
beforeSend: function() {
console.log("hello default ajax");
},
success: function(xhr) {
console.log("success!");
console.log("Request 2 ")
var ajax = ajaxReq({
url: "/",
success: function(xhr) {
console.log("success 2!");
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment