Is there an inbuilt way to use JQuery's .each() in reverse?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1394020/jquery-each-backwards">JQuery .each() backwards</a>  </p>
</blockquote>



<p>What is the easiest way to use <code>.each()</code> in reverse? At the moment I am doing this:</p>

<pre><code>var temp = [];

$("#nav a").each(function()
{
    temp.push($(this));
});

temp.reverse();
for(var i = 0; i &lt; temp.length; i++)
{
    var a = temp[i];

    // Work with a.
}
</code></pre>

<p>It would be nice if I could do something like:</p>

<pre><code>$("#nav a").reverse().each(function()
{
    // Work with $(this).

});
</code></pre>

<p>The context is that I have a collection of elements using <code>float: right</code> which displays them in reverse order and I want to iterate over them from left to right like normal.</p>
