I can do this:
$('my-panel').innerHTML = '<p> New content </p>';
But if there any way of doing something like
$('my-panel').wholeHTML = "<div id='my-panel'><p> New Content</p></div>";
I can’t find any way. If I can’t do something like this, I’ll have to refactor a whole bunch of stuff, which would be time consuming.
What about
outerHTML, which includes the ‘whole’ tag:http://jsfiddle.net/pimvdb/Sah2U/1/