1

Consider the following HTML:

<div>
    aaaa
    <span>bbbb</span>
    cccc
    <span>dddd</span>
    eeee
</div>

How can I use JQuery to match the [aaaa, cccc, eeee] elements? I've attempted

$('div > :not(span)') 
$('div:not(span)') 
$('div').not('span')

But they all returned an empty array.

Vittorio Romeo
  • 86,944
  • 30
  • 238
  • 393

0 Answers0