Skip to content

Instantly share code, notes, and snippets.

@msroot
Created August 1, 2012 06:16
Show Gist options
  • Select an option

  • Save msroot/3224209 to your computer and use it in GitHub Desktop.

Select an option

Save msroot/3224209 to your computer and use it in GitHub Desktop.
bind all rails htr
$('html')
.bind("ajax:beforeSend", function(evt, xhr, settings){
console.log("ajax:beforeSend");
})
.bind("ajax:success", function(evt, data, status, xhr){
console.log("ajax:success");
})
.bind("ajax:error", function(evt, xhr, status, error){
console.log("ajax:error");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment