Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#6178 closed bug (wontfix)

.parents() reverses element order

Reported by: RF Owned by:
Priority: Milestone: 1.4.2
Component: traversing Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:


Since jQuery 1.4, the parents() function reverses the order of the elements.


<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script language="JavaScript">
	$("div span").parents("div").each( function() {
		alert( $(this).text() );
	} );

Change History (2)

comment:1 Changed 13 years ago by john

Resolution: wontfix
Status: newclosed

Yep, this is intended - as with prevAll and prevUntil. Having them be reversed makes it much easier to access the intended value (for example, doing .parents(":first") will be equivalent to .parent()).

comment:2 Changed 12 years ago by jitter

#5994 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.