删除所选图像Jquery
问题描述:
我希望能够从容器中只删除选定的图像,这些图像从页面中的库中选择。用户可以选择尽可能多的图像,因为他或她喜欢的图像然后显示在容器中,但我似乎找不到方法来删除它们我只能隐藏图像我想能够删除图像,并阻止它从躲了起来。我很抱歉没有小提琴,我的代码很长。这里是一个脚本删除所选图像Jquery
$('img').on('click', function() {
$('#fotos').append('<div class="imgdrag"><img class="modal-content" src="' + $(this).attr('src') + '"/></div>');
$('.imgdrag').draggable();
$('#fotos').droppable();
$('.modal-content').resizable();
$(".download").attr("href", $(this).attr('src'));
$(".download").show();
});
});
<div id="fotos" class="bananas"><img class="modal-content" id="imgdisplay" /></div>