I need to use jQuery to append an image into a div and although I have read numerous posts, I haven't come with a conclusion.
I have a div call profileIcon and I want in it an image of an that will be loaded using an api. There fore I must load it dynamically.
<div class="profileIcon" id="profile">
<!--want image here -->
</div>
<script>
var image = "data...";
</script>
Somehow append image an image into .profileIcon, or #profile with a src of the variable img. Any help is appreciated. Thanks in advance. jQuery or JS is fine