重複の可能性:
JQuery .each() 後方
.each()
逆に一番使いやすいのは?現時点で私はこれをやっています:
var temp = [];
$("#nav a").each(function()
{
temp.push($(this));
});
temp.reverse();
for(var i = 0; i < temp.length; i++)
{
var a = temp[i];
// Work with a.
}
次のようなことができればいいのですが:
$("#nav a").reverse().each(function()
{
// Work with $(this).
});
float: right
コンテキストは、それらを逆順に表示する要素のコレクションがあり、通常のように左から右に反復したいということです。