Reputation: 3652
I have an img element that is both draggable and resizeable. I am trying to create a delete button for this element. the delete button is embeded in the draggable container. When I do
$('deleteBtn').parent().remove();
everything goes except the original image. What am i doing wrong.
click the image to create the draggable, then the top left black box is the delete.
Edit: Is it possible this has something to do with the static positioning of the img element?
Upvotes: 0
Views: 34
Reputation: 1855
This seems to work:
deleteBtn.click(function(){
$(this).siblings('img').remove();
$(this).parent().remove();
});
Upvotes: 2