Skip to content

Commit

Permalink
jquery-form#218; wrong context scope
Browse files Browse the repository at this point in the history
  • Loading branch information
malsup committed Jul 29, 2012
1 parent 9e99be4 commit 37c4827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* jQuery Form Plugin
* version: 3.10 (20-JUL-2012)
* version: 3.11 (20-JUL-2012)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
Expand Down Expand Up @@ -165,7 +165,7 @@ $.fn.ajaxSubmit = function(options) {
}

options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
var context = options.context || options; // jQuery 1.4+ supports scope context
var context = options.context || this ; // jQuery 1.4+ supports scope context
for (var i=0, max=callbacks.length; i < max; i++) {
callbacks[i].apply(context, [data, status, xhr || $form, $form]);
}
Expand Down

0 comments on commit 37c4827

Please sign in to comment.