I am trying to do a simple thing maybe i am missing something:
var span = $(document.createElement("span")); // Create a span
var img = new Image(); // Create an image and set source
img.src = config.graph_url + member.facebook_id + "/picture?width=24&height=24";
span.append($(img)); // Add the image inside the span
How can i get the html <span><img src="_SOURCE_"/></span>
? span.html()
outputs <img src="_SOURCE_"/>
.