JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
JavaScript
jQuery.fn.outerHTML = function() {
return $('<div />').append(this.eq(0).clone()).html();
};
var myImage = $("<img src='blah.gif' />")
alert(myImage.outerHTML());