我正在使用这个表单插件
但是对于我的生活,我无法弄清楚在提交表单后如何进行大量的 DOM 操作。
$('.save-form').each(function() {
$(this).ajaxForm({
beforeSubmit: function() {
//
},
success: function(data) {
//
}
});
});
我试过$(this).find('div').hide();
但无济于事。
HTML:
<form method="post" class="save-form">
<!-- inputs are here -->
<div>I want to hide this as well as the parent, "save-form".</div>
</form>
<form method="post" class="save-form">
<!-- inputs are here -->
<div>I want to hide this as well as the parent, "save-form".</div>
</form>
<form method="post" class="save-form">
<!-- inputs are here -->
<div>I want to hide this as well as the parent, "save-form".</div>
</form>
是的,我有不止一个“保存表单”实例