Bug Tracker

Modify

Ticket #11842 (closed bug: duplicate)

Opened 12 months ago

Last modified 12 months ago

using find(with selectos and filter :not(with some selectors) )

Reported by: biavatipaolo@… Owned by: biavatipaolo@…
Priority: high Milestone: None
Component: selector Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

this instruction works (only one selector in :not filter)

ie: $('#menuStato > li > a').find('+ ul > li:not(.toggleMenuActions)')

when i use the :not filter with two or more class selector inside separated by ',' on a selector that start with '+' in a find function

the result is an empty array

ie: $('#menuStato > li > a').find('+ ul > li:not(.toggleMenuActions, .toggleMenuFooter, .nascosto)')

The same instruction written like the follow works... (i just moved the ' > a ' from the fist brackets to the second one

ie: $('#menuStato > li').find(' > a + ul > li:not(.toggleMenuActions, .toggleMenuFooter, .nascosto)')

Change History

comment:1 Changed 12 months ago by sindresorhus

  • Owner set to biavatipaolo@…
  • Status changed from new to pending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 12 months ago by biavatipaolo@…

  • Status changed from pending to new

I made a jsFiddle example test

 http://jsfiddle.net/XHjqL/1/

comment:3 Changed 12 months ago by gnarf

  • Status changed from new to open

Positional selectors and find() have been known to play weirdness before... This has a test case now though, we'll see what the selectors guys have to say about it.

comment:4 Changed 12 months ago by timmywil

  • Priority changed from undecided to high
  • Resolution set to duplicate
  • Status changed from open to closed
  • Component changed from unfiled to selector

comment:5 Changed 12 months ago by timmywil

Duplicate of #11814.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.