This is prob a quite weird or simple error. But it's doing my head in lol. The code below is a click event handler aimed at 2 <img>
elements. You click on the one <img>
element classed "undo" - This should remove the <img>
being clicked and also the element classed "bin" directly next to it at the same time. I manage to either the one or the other removed but not both. Can anyone help please?
Thank you
Walter
JS:
$('ul').on('click','.undo',function(e) {
$(this).remove();
$(this).prev().remove();
HTML:
<img src="images/bin.png" align="right" class="bin">
<img src="images/undo.png" align="right" class="undo">