I'm using jQuery Form plugin (https://github.com/malsup/form):
$("#dlgTask form").ajaxForm({
success: function(res) {
var form = this;
}
});
In success
function, form
variable seems an object other than the form itself. How to access the form, so I can avoid using $("#dlgTask form")
again for reusability? Thanks.
The success' callback function has a 4th argument for your jQuery-wrapped form element.
You can also simply store your form element before using ajaxForm()