notebook/app/assets/javascripts/image_uploads.js
2020-09-18 20:08:08 -07:00

6 lines
339 B
JavaScript

// When a user clicks to delete an image, we should remove it from the list of images after the remote request finishes
$('a.js-remove-image[data-remote]').on('ajax:success', function(e, data, status, xhr) {
// Remove the image from the UI
$(this).closest('.row').fadeOut().remove(); // todo use animate.css for something more fun
});