feature for Deferred
luwfls opened this issue · 1 comments
luwfls commented
- 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"); });
kevindb commented
I am closing this issue due to a lack of activity. If you still need help, please comment and we can reopen.