I am using the following code to get innerHTML of $(this):
var html=$(this).html();
So for example if $(this) refers to <div class="hello">Some <strong>HTML</strong> here.</div>, var html will be Some <strong>HTML</strong> here..
Great, but what I want to get is the whole HTML for $(this), including <div class="hello"> and </div>.
How can I do that please?
You could use
or