Browse files

add list of callbacks on ajax call

  • Loading branch information...
1 parent 61dad18 commit 8bf2101dac52770611c006bb63b194a77640b5d8 Neeraj Singh committed Nov 1, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/rails.js
View
9 src/rails.js
@@ -19,7 +19,14 @@ jQuery(function ($) {
},
/**
- * Handles execution of remote calls firing overridable events along the way
+ * Handles execution of remote calls. Provides following callbacks:
+ *
+ * - ajax:before - is execute before the whole thing begings
+ * - ajax:loading - is executed before firing ajax call
+ * - ajax:success - is executed when status is success
+ * - ajax:complete - is execute when status is complete
+ * - ajax:failure - is execute in case of error
+ * - ajax:after - is execute every single time at the end of ajax call
*/
callRemote: function () {
var el = this,

0 comments on commit 8bf2101

Please sign in to comment.