jquery each from last to first code example Example: jquery loop through collection backwards $($("li").get().reverse()).each(function() { /* ... */ });