单击 .icon-trash 删除父级时遇到问题
<div class="ui-wrapper ui-draggable">
<img id="link1" class="decor ui-resizable" src="http://i.imgur.com/nYkdOne.png">
<div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;"></div>
<div class="ui-resizable-handle ui-resizable-s" style="z-index: 90;"></div>
<div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 90;"></div>
<img class="icon-layer-up icon-on-img" src="" style="z-index: 1;">
<img class="icon-layer-down icon-on-img" src="" style="z-index: 1;">
<img class="icon-trash icon-on-img" src="" style="z-index: 1;">
<img class="icon-copy-el icon-on-img" src="" style="z-index: 1;">
</div>
我的 js 代码仅删除具有类 .icon-on-img 的元素
$(document).on('click', '.icon-trash', function() {
$(this).parent().remove();
});
如何通过单击 .icon-trash 元素删除所有内容?