Skip to content

Instantly share code, notes, and snippets.

@carlzulauf
Created May 14, 2014 20:48
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 carlzulauf/7b3aff3c17456da1d9ea to your computer and use it in GitHub Desktop.
Save carlzulauf/7b3aff3c17456da1d9ea to your computer and use it in GitHub Desktop.
Backbone.ajax = function(){
var old_function = Backbone.ajax
return function() {
// do some stuff before calling the old function
result = old_function.apply(arguments)
// do some stuff after calling the old function
return result
}
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment