Skip to content

Commit 37c4827

Browse files
committed
jquery-form#218; wrong context scope
1 parent 9e99be4 commit 37c4827

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery.form.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 3.10 (20-JUL-2012)
3+
* version: 3.11 (20-JUL-2012)
44
* @requires jQuery v1.3.2 or later
55
*
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -165,7 +165,7 @@ $.fn.ajaxSubmit = function(options) {
165165
}
166166

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

0 commit comments

Comments
 (0)