My html is:
<div>
Some text
<span>label text</span>
</div>
Jquery:
??
I want output printed as –
"Some text"
When I do $("div").text(), I get Some textLabel text
and when I do $("div").html(), I get Some text<span>Label text</span>
Try this plz:
Working demo http://jsfiddle.net/f8VFf/ you can also look for
innerHTMlandoutterHTML