Ticket #3745 (closed bug: fixed)
1.3 beta 1: :not(:first) fails
| Reported by: | pixeline | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3 |
| Component: | selector | Version: | 1.2.6 |
| Keywords: | wildcard,selector | Cc: | pixeline |
| Blocking: | Blocked by: |
Description
var allItems = $('div.ds-item', datascape); (...)
$('*', allItems).not('p, a,form').show();
triggers this error in firebug: Error: match[3] is undefined jquery-1.3b1.js Line 1812
testcase here: http://pixeline.be/experiments/jquerybeta/test1.html
it seems related to the use of the wildcard '*' but you're the experts :)
Change History
comment:3 Changed 4 years ago by john
- Summary changed from 1.3 beta 1: selector issue to 1.3 beta 1: :not(:first) fails
This is a duplicate of #3757.
However, the bug that Karl posted is a different one, so I'm just going to morph this ticket to refer to Karl's test case!
comment:4 Changed 4 years ago by john
- Status changed from new to closed
- Resolution set to fixed
Just landed a fix for this in Sizzle, will be merging into jQuery shortly.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I think it's related to the .not() method (also :not() selector).
Another test case here: http://13beta.learningjquery.com/13b1.html
This triggers the same error (in Error Console, but not in Firebug): $('li:not(:last-child)')
These return all LI elements, rather than the correct set: $('li').not(':odd') $('li').not(':odd:first')