I have an element with encoded html content as shown below.
<div class="hasTooltip">
<html>........... //more html encoded text
</div>
When I click this element, I want the content to be shown in a new window and it works fine.
$('.hasTooltip').click(function() {
var win = window.open("", "Title", "toolbar=no");
win.document.body.innerHTML = $(this).html();
});
But the problem is that the window shows the html text with decoded values but not the actual html content with all styles.
I tried the below code but no luck as it shows no content. Any tips?
win.document.body.innerHTML = $(this).html().text();