Modify ↓
Ticket #5994 (closed bug: duplicate)
prevAll and parents return in reverse document order
| Reported by: | john | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.5 |
| Component: | core | Version: | 1.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The return order should be brought inline with the all the other jQuery methods.
http://forum.jquery.com/topic/revert-to-old-fn-add-behaviour-but-provide-a-fn-sort
Change History
comment:2 Changed 3 years ago by snover
- Priority changed from major to high
- Status changed from new to open
- Milestone changed from 1.4.4 to 1.5
comment:3 Changed 2 years ago by dmethvin
We've documented that "the elements are returned in order from the closest parent to the outer ones" so making this change could break a lot of code.
Since other operations may re-sort the collection we can't guarantee that the reversed order is preserved on a chain.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

The order seems to differ when using Internet Explorer 7. IE7 uses eq(0) to locate the object the furthest away while other browsers show the object the nearest to your original object.