Bug Tracker

Opened 10 years ago

Closed 10 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:


This selector fails with the following html structure:

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

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.


Change History (1)

comment:1 Changed 10 years ago by gibson042

Resolution: duplicate
Status: newclosed

Duplicate of #14043.

Note: See TracTickets for help on using tickets.