Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#14693 closed bug (notabug)

.filter() does not preserve selector order

Reported by: shadowhand Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:


When using .filter() on a set of elements with the selector .active, :first the first element in the set will be the :first, not .active as expected.

Test case: http://jsfiddle.net/meuQ3/1/

Change History (3)

comment:1 Changed 9 years ago by shadowhand

FWIW, bug also appears in latest 2.x.

comment:2 Changed 9 years ago by scottgonzalez

Resolution: notabug
Status: newclosed

Results are always sorted in DOM order.

comment:3 Changed 9 years ago by shadowhand

Wow... I've been using jQuery for years and never noticed it was strictly DOM order. The more you know...

Note: See TracTickets for help on using tickets.