Select LI only if it has a UL for a child
I have a list (simplified version example)
<ul>
<li><a>Grandfather</a>
<ul>
<li><a>Father <span>Desc</span></a>
<ul>
<li><a>Son <span>Desc</span></a></li>
<li><a>Daughter <span>Desc</span></a></li>
</li>
<li><a>Uncle <span>Desc</span></a></li>
<li><a>Another Top Level
<span>Desc</span></a></li>
<li><a>Final Top Level
<span>Desc</span></a></li>
</li>
I want to be able to select the span elements that have a sub ul (ie, Grandfather,Father, but not son or daughter. I tried
$('#page-ui li:has("ul") span'), which works for the top level nav that doesn't have any children, but shows up for uncle and son and daughter since it applies it to all the spans inside the first li with a sub ul.
I also tried $('#page-ui li:has("ul") span:first-child'), but that didn't help either since all the spans are the first childre