Bug Tracker

Ticket #7063 (closed bug: invalid)

Opened 5 years ago

Closed 5 years ago

#7063 closed bug (invalid)

Bug with :not and :last

Reported by: hobbestigrou Owned by:
Priority: Milestone: 1.4.3
Component: selector Version: 1.4.2
Keywords: selector, :last, :not, :first Cc:
Blocked by: Blocking:



I'm using the latest version of jQuery 1.4.2.

I have a problem with :not and :last I think. For exemple when I try with this syntax: $('.reverse:visible:last:not(:first)');

and this match anything, but if I use this syntax: $('.reverse:visible:not(:first):last');

This matches one element, so this is ok.

I've tried with chromium 6.0.4 and Firefox 3 and 4.

Change History

comment:1 Changed 5 years ago by snover

comment:1 Changed 5 years ago by snover

  • Resolution set to invalid
  • Status changed from new to closed

This is not a bug.

The first selector finds the last .reverse, then removes it if it is the first of the filtered elements. Since it is always the first, it will always be filtered away.

The second selector finds all .reverse that are not the first, and then picks the last one of those.

Note: See TracTickets for help on using tickets.