You can map the native array reversal method to a jQuery function.
$.fn.reverse = [].reverse; // e.g., loop through list elements in reverse order. $("ul").children("li").reverse().each( function() { ... } );
You can map the native array reversal method to a jQuery function.
$.fn.reverse = [].reverse; // e.g., loop through list elements in reverse order. $("ul").children("li").reverse().each( function() { ... } );