I'm using dropzone.js and my "remove when it's finished" code looks like this:
Dropzone.options.myAwesomeDropzone = {
init: function () {
this.on("success", function (file) {
this.removeFile(file);
});
}
};
It works as expected, but the section is removed instantly. What I'd like is for that to take a second and fade out so that the user can actually see that the image completed before it's gone. How can I add some kind of transition to removeFile?
With jQuery, should be something like this...
Dropzone.options.myAwesomeDropzone = {
init: function () {
this.on("success", function (file) {
var _this = this;
$(file.previewElement).fadeOut({
complete: function() {
// If you want to keep track internally...
_this.removeFile(file);
}
});
});
}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With