I’m wondering how I would get the text of a nested list item without getting the text of its children i.e.
<ul>
<li id="node">
I want this
<ul>
<li>
I don't want this
</li>
</ul>
</li>
</ul>
Now using jQuery with $('#node').text() gets me all text, where as I just want the "I want this" string.
There’s a Text Children Plugin for this, if it’s something you’ll want to do often. It offers you a few options for the output too.