title: Using .text() to retrieve only text not nested in child tags
body: <p>If I have html like this:</p>
  
  <pre><code>&lt;li id="listItem"&gt;
      This is some text
      &lt;span id="firstSpan"&gt;First span text&lt;/span&gt;
      &lt;span id="secondSpan"&gt;Second span text&lt;/span&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I'm trying to use <code>.text()</code> to retrieve just the string "This is some text", but if I were to say <code>$('#list-item').text()</code>, I get "This is some textFirst span textSecond span text".</p>
  
  <p>Is there a way to get (and possibly remove, via something like <code>.text("")</code>) just the free text within a tag, and not the text within its child tags?</p>
  
  <p>The HTML was not written by me, so this is what I have to work with. I know that it would be simple to just wrap the text in tags when writing the html, but again, the html is pre-written.</p>