Hi,
I use the $.post
function to submit an ajax request as such:
$('.typeAform').submit(function(){
$.post('/home', { somevar : 'somevalue' }, function(){
//do something with the original form
});
return false;
});
I'd like to identify my form after submission from the $.post
callback so I can do something with it (i.e. change its background color, delete it, etc...).
Normally, I'd be able to call the form by its unique id that I know ahead of time, but here I don't have it - I am using a class for the form, not a single id.
Is there a way I can identify the form I just submitted without using a global variable (i.e. pass it to the callback somehow).
Thanks!