Given this html:
<div id='tst1'>
<div id='tst2'>tst2</div>
<div id='tst3'>tst3</div>
this is the text i want
</div>
How can I select for the ‘this is the text i want’ text? $('#tst1').text() gives me all of the text elements contained within tst1 (e.g. tst2, tst3, etc.).
I cannot depend on knowing the id’s of the contained wrapped elements (tst2, tst3 above), but I can depend on the text I want being listed last in the group.
Try this plz:
Working demo http://jsfiddle.net/We7mZ/ you can also look for
innerHTMlandoutterHTML