I'm trying to get the text contents of a list item that also contains
a nested list -- but only want the text content of the parent <li>,
and not the <ul> also contained within it. Markup would look something
like:

<ul class="specialList">
   <li>The list item text
      <ul>
         <li><a href="#">Sub item one</a></li>
         <li><a href="#">Sub item two</a></li>
         <li><a href="#">Sub item three</a></li>
      </ul>
   </li>
</ul>

So what I'm trying to get jQuery to capture is "The list item text",
but nothing else in that <li>...

Is there a way to accomplish this?

Thank you!

Reply via email to