Making an object (or something?) from a string:
var thing = $.parseHTML("<h1>Some HTML</h1>"); // i.e., from $("#something").html()
Converting it back into a string?
$(thing).html(); // doesn't work
undefined
$(thing).get(0).outerHTML; // doesn't work
undefined
$(thing).outerHTML; // doesn't work
undefined
$(thing).get(0).html(); // doesn't work
undefined
What's the inverse of $.parseHTML()
? I just want to modify some HTML and put it back where I got it.