Is there a way in jQuery of setting all forms to a certain post request and then overriding specifically the success callback for each form?
Something like this:
$("form").submit(function(){
$.post(url,function (){ callback actions});
});
$("form#foo").submit(function(){
do the same
$.post(url, function(){ different actions});
});
Add the callbacks in an array, using the id of the form as key. In your success callback you can do: