You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think ajaxSubmit shoud be a deferred Object 。 so that we can use $.when()
usecase as below
var deferreds = [];
// there are more than one form
$("form").each(function () {
deferreds.push($(this).ajaxSubmit({
success: function (data) {
console.log(data);
$(this).find("input[name$='id']").val(data.id);
$(this).find("input[name$='materiaName']").val(data.materiaName);
$(this).find("#preview-btn").unbind("click");
$(this).find("#preview-btn").attr("onclick", "openImgeMadal(" + data.url + ")");
}
}));
});
$.when.apply($, deferreds).done(function () {
console.log("all ajax down");
});
The text was updated successfully, but these errors were encountered:
$.when()
The text was updated successfully, but these errors were encountered: