Possible Duplicate:
Get selected element's outer HTML
Please get me out of this doubt.
My HTML code is
<div id="ToBe"><div class="text">Hello</div></div>
My jQuery code is
var x=$('#ToBe').html();
alert(x);
But it is displaying
<div class="text">Hello</div>
But my requirement is to display
"<div id="ToBe"><div class="text">Hello</div></div>"
as output.
How can i get that.