SyntaxFix
Write A Post
Hire A Developer
Questions
Create a temporary element, then clone() and append():
clone()
append()
$('<div>').append($('#xxx').clone()).html();