JSFiddle - React, Tailwind, and code Playground
by mori57
HTML
<textarea id="code"><a href='test.html'><img src='test.jpg'></a></textarea>
JavaScript
var code=$("#code").val();
var banner=$(code);
alert(banner.html());
alert(banner.attr("href"));
banner.attr("href","manipulated.html");
//* this writes <img src="test.jpg" to the textarea, I want it to write <a href="manipulated.html"><img src="test.jpg"></a>
$("#code").val(banner.html());