How can I do an outerHTML but for the outer relement only?
I would like to get the HTML of the outer element only. Does jQuery have a method or do I have to roll my own?
E.g.
if in the example below,
I use $("#
cont1")[0].outerHTML I get everything.
But what I want to return only the character string "
<div class='
outer
' id='cont1'>" with or without the </div> is ok.
-
<div class='outer' id='cont1'>
stuff here
<div class='inner' id='cont2'>
something here
</div>
</div>