Closed
Description
I don't know if this plugin is still supported (it seems it's not), but in case anyone is interested, there is a problem with this code in ajaxSubmit:
if (!options.dataType && options.target) {
var oldSuccess = options.success || function(){};
callbacks.push(function(data) {
var fn = options.replaceTarget ? 'replaceWith' : 'html';
$(options.target)[fn](data).each(oldSuccess, arguments);
});
}
because, in jQuery 1.12.1, they have changed the function each() from
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
each: function( callback, args ) {
return jQuery.each( this, callback, args );
},
to
// Execute a callback for every element in the matched set.
each: function( callback ) {
return jQuery.each( this, callback );
},
That means that the success callback function is called without parameters.