What's the best way to select the html of an element, inclusive? For example:
<div id="testDiv" class="testClass">
This is just a test.
</div>
Whereas $('#testDiv').html()
returns "This is just a test."
, I would a selector that returns:
<div id="testDiv" class="testClass">This is just a test.</div>
.
Thank you for your replies.