I\'m using JQuery to select some elements on a page and then move them around in the DOM. The problem I\'m having is I need to select all the elements in the reverse order t
I prefer creating a reverse plug-in eg
jQuery.fn.reverse = function(fn) { var i = this.length; while(i--) { fn.call(this[i], i, this[i]) } };
Usage eg:
$('#product-panel > div').reverse(function(i, e) { alert(i); alert(e); });