Change / reverse order of jQuery parents() selector
<p>I am using the following selector for an each loop in jQuery:</p>

<pre><code>$("#myid").parents().andSelf().each(function({})
</code></pre>

<p>The selector returns an object like this:</p>

<pre><code>object[html, body, div#global_container, div#content, div#myarea, span.myclass, div#myid]
</code></pre>

<p>That means the <code>each</code> loop will start with the furthest parent and then eventually ends with <code>self</code></p>

<p><strong>How can I reverse that order so that the <code>each</code> loop will start with <code>self</code> and work its way up the dom tree instead of down?</strong> </p>
