JQuery add image inside of div tag

jquery

I have a div tag

<div id="theDiv">Where is the image?</div>

I would like to add an image tag inside of the div

End result:

<div id="theDiv"><img id="theImg"  src="theImg.png" />Where is the image?</div>

Best Solution

Have you tried the following:

$('#theDiv').prepend('<img id="theImg" src="theImg.png" />')