Is there a good way of printing out a jQuery object as pure HTML?
ex:
<img src="example.jpg">
<script>
var img = $('img').eq(0);
console.log(img.toString());
</script>
toString() doesn’t work this way. I need the HTML equivalent string , i.e:
<img src="example.jpg">
If you need to print the object in HTML format, use this extension outerHTML or this outerHTML.
Update
Update the link and include the code for second link: