Reputation: 657
How would one select only the 'foo' text (and not the span) in this example?
<div class="bar">foo
<span>...</span>
</div>
Alternatively, what would your search query to figure this out be? I'm at a loss...
Upvotes: 0
Views: 84
Reputation: 657
With JQuery & cheerio, it seems one can use :
$('div.bar').contents()[0]
src: How do I select text nodes with jQuery?
Upvotes: 1