Skip to content

Commit ddb4c57

Browse files
committed
options.success can be an array of functions
Copied from #414 Thanks @tweini
1 parent 748a67c commit ddb4c57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery.form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ $.fn.ajaxSubmit = function(options, data, dataType, onSuccess) {
212212
});
213213
}
214214
else if (options.success) {
215-
callbacks.push(options.success);
215+
$.isArray(options.success) ? callbacks.push.apply(callbacks, options.success) : callbacks.push(options.success);
216216
}
217217

218218
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg

0 commit comments

Comments
 (0)