Yes, it will always be in hierarchical order. There are at least two unit tests that cover this:
http://dev.jquery.com/view/trunk/jquery/test/unit/core.js lines 1294,1295 - Richard On Thu, Sep 25, 2008 at 3:54 PM, jasonkarns <[EMAIL PROTECTED]> wrote: > > Will the .parents() method always return in hierarchical order? Say I > have: > > <ol id="outer"> > <li> > <ol id="inner"> > <li> > <a id="target"/> > </li> > </ol> > </li> > </ol> > > If I do $("#target").parents("ol").eq(0), will I *always* get #inner, > or is the order of the resulting jQuery matched elements arbitrary? > > ~Jason >