我需要选择每个$('div span:eq(0)').text()
inside $('div#first')
。如何将这两个选择器串在一起?
<div id="first">Some stuff to be ignored.</div>
<div>
<div>
<ul>
<li>
<span>Some text</span> <!-- need this -->
<span>Skipped text</span>
</li>
</ul>
</div>
<div>
<ul>
<li>
<span>Some text</span> <!-- and this -->
<span>Skipped text</span>
</li>
</ul>
</div>
<!-- this pattern continues unknown # of times -->
</div>