I have the following:
$('.fileupload').fileupload({
dataType: 'json',
add: function(e, data) {
...
},
done: function(e, data) {
...
}
});
What I need to do is be able to use the following between all ajax settings (add
, and done
):
var form = $(this).closest('form');
How would I use that variable in the function call so it can be used between all options?