Using blueimp jquery-file-upload, I'd like to change a variable when clicking the cancel button.
The cancel button is displayed at right of the each file added.
I tried below but nothing has been happend.
How can I do this?
$(function () {
var file_count = 0
$('#fileupload').fileupload({
acceptFileTypes: /(\.|\/)(pdf|PDF)$/i
}).bind('fileuploadadd', function (e, data) {
file_count += data.files.length
$('td.cancel button.btn-warning').click(function (e) {
file_count -= 1
});
});
});