From b37fffcdb33370e882cc3f5f54a85b8fee05d277 Mon Sep 17 00:00:00 2001 From: kares Date: Fri, 1 Apr 2011 16:39:22 +0200 Subject: [PATCH] ajax callbacks should execute within the context of the element - makes no sense as all callbacks are specified and thus override global ones but still feels much cleaner --- src/rails.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rails.js b/src/rails.js index 5f14c5ae..dc28c6ce 100644 --- a/src/rails.js +++ b/src/rails.js @@ -43,6 +43,7 @@ data = null; } $.ajax({ + context: element, url: url, type: method || 'GET', data: data, dataType: dataType, // stopping the "ajax:beforeSend" event will cancel the ajax request beforeSend: function(xhr, settings) {