Bug Tracker

Opened 12 years ago

Closed 12 years ago

#9458 closed bug (invalid)

:not() selector problem?

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


With regard to this http://stackoverflow.com/questions/1730609/using-jquery-not-selector-to-exclude-elements-with-particular-children/6157579#6157579

the first suggestion in Russ Cam's post, i.e:

$("div.divToAppendTo:not(div > span.myAppendedMarkup)")

doesn't seem to work. It selects all the divs rather than just those without the span child. I don't, however, understand why it doesn't work, so I'm raising it as a possible bug.

Hope I'm not wasting your time.

Change History (3)

comment:2 Changed 12 years ago by dcherman

From what I can see, the reason the provided suggestion doesn't seem to work is that the selector in the :not selects all of the span elements with the given class rather than the parent DIV


comment:3 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

In the first you're *selecting* the span, which does not match any div.

Note: See TracTickets for help on using tickets.