Original:
<div id="test">
...
</div>
After appending:
<div id="test">
...
<img src=".." />
</div>
After removing:
<div id="test">
...
</div>
Original:
<div id="test">
...
</div>
After appending:
<div id="test">
...
<img src=".." />
</div>
After removing:
<div id="test">
...
</div>
// add
$("#test").append("<img src='...' />")
// remove
$("#test img:last-child").remove()
$('div#test').append('<img src=".."/>');
$('div#test > img').remove();
Note that you can give the image a class as well, in case you only want to remove the one you added.
hey can you tell me please how can get a list of images in a div using jquery