var img = $("<img></img>"); img.attr("src", "images/newImage.jpg"); $("div").append(img);
source attribute of each and then appending them to the correct location.
For example, the following code creates an
<img> element, sets the
src attribute to define the file location, and then appends the image to a
var img = $("<img></img>"); img.attr("src", "images/newImage.jpg"); ...