javascript - Remove image on image click -
i want remove image , not whole div on clicking cross button. took reference here.
$('.remove-img').click(function(e) { $( ).parent().remove(); });
traverse parent()
.find()
image excluding current image. can use remove()
use
$('.remove-img').click(function (e) { $(this).parent().find('img').not(this).remove(); //if want remove images //$(this).parent().find('img').remove(); });
Comments
Post a Comment