I have a weird problem with jQuery File Upload plugin. If I use this sitax:
$('fileupload').fileupload({
url: myurl,
add: function(e, data){
console.log("add event");
},
processalways: function(e, data){
console.log("processalways event");
}
});
processalways event don't occur, but I got correct data.context variable (i.e. the div with the progress bar of the added file).
While when I use this sintax
$('fileupload').fileupload({
url: myurl
}).on('fileuploadadd',function(e, data){
console.log("add event");
}).on('fileuploadprocessalways', function(e, data){
console.log("processalways event");
});
processalways event correctly occur, but I got wrong data.context (I think in this case data.context will always refer to $('fileupload') element.
I need both process event and data.context variable. How can I do?