Bug Tracker

Opened 12 years ago

Closed 11 years ago

#11385 closed bug (duplicate)

parents() orders each tier of results back-to-front

Reported by: wheresrhys Owned by:
Priority: low Milestone: None
Component: traversing Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


Not sure if this counts as a bug, but when finding parents of a collection of more than one element the resulting collection has the parents in a back-to-front order at each tier.


<div class="div1"><span></span></div><div class="div2"><span></span></div>

$("span").parents() // [div2, div1, body, html]
                    // expected [div1, div2, body, html]


Change History (2)

comment:1 Changed 12 years ago by sindresorhus

Component: unfiledtraversing
Keywords: needsdocs added
Priority: undecidedlow
Status: newopen

This is by design, but the docs should mention it.

comment:2 Changed 11 years ago by Timmy Willison

Keywords: needsdocs removed
Resolution: duplicate
Status: openclosed
Note: See TracTickets for help on using tickets.