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
  • 90,666
  • 33
  • 258
  • 416

0 Answers0