I would like to convert a html element created from a string back to the string after some modifications. But I get an empty string instead.
$(\'
you can just wrap it into another element and call html after that:
html
$('').html();
note that outerHTML doesn't exist on older browsers but innerHTML still does (it doesn't exist for example in ff < 11 while it's still used on many older computers)
outerHTML
innerHTML