I have this code;
$(this).children("a:eq(0)").append( '' );
Now I want to remove last appened element (an image). Please give sugguestions;
I have this code;
$(this).children("a:eq(0)").append( '' );
Now I want to remove last appened element (an image). Please give sugguestions;
You can use the :last-child selector to find the last appended element, then you can remove it:
$('img:last-child', this).remove();
// get the last img element of the childs of 'this'