jQuery callbacks - short version
- by Frankie
I've dug the manual and tried extensivelly to drop the extra function(){...} call after the error and success to do it like mootools but to no good luck.
Is there any way i can avoid the extra function in jQuery?
function doFileDelete(ui) {
$.ajax({
error: function() { doFileDeleteAnimation(ui, false) },
success: function() { doFileDeleteAnimation(ui, true) },
url: '/url-to-delete-file'
});
}
Thank you!