Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14044 closed bug (duplicate)

$('#root').find(':not(#nested) > li') fails

Reported by: ngryman Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.2
Keywords: Cc:
Blocked by: Blocking:

Description

This selector fails with the following html structure:

<ul id="root">
    <ul id="nested">
        <li></li>
    </ul>
    <li></li>
    <li></li>
</ul>

The QSA version works fine.

But if I change the container to a superior level (i.e. body) this works fine:

$('body').find(':not(#nested) > li')

It seems this selector does not work with direct children.

Here is a jsfiddle that illustrates the bug : http://jsfiddle.net/ngryman/tsw4b/. It fails for any version of jQuery.

Thanks.

Change History (1)

comment:1 Changed 6 years ago by gibson042

Resolution: duplicate
Status: newclosed

Duplicate of #14043.

Note: See TracTickets for help on using tickets.