28 January 2015 09:30
JQuery - DEMO - arrays - JQuery .each() backwards - Stack Overflow
Here are different options for this:
You can use this:
$($("ul > li").get().reverse()).each(function (i) {
$(this).text( 'Item ' + (++i));
});
===or====
$($(".block-item").get().reverse()).each(function (i) {
$(this).text(++i);
});
1
(1 marks)