Skip to main content

Bug Tracker

Side navigation

#11385 closed bug (duplicate)

Opened February 23, 2012 09:26PM UTC

Closed August 29, 2012 08:48PM UTC

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:
Description

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.

e.g.

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

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

http://jsfiddle.net/vkGEQ/

Attachments (0)
Change History (2)

Changed February 27, 2012 04:42PM UTC by sindresorhus comment:1

component: unfiledtraversing
keywords: → needsdocs
priority: undecidedlow
status: newopen

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

Changed August 29, 2012 08:48PM UTC by timmywil comment:2

keywords: needsdocs
resolution: → duplicate
status: openclosed