fiddle
pretty much the same as the other guy, only I use .detach (), which is guaranteed to keep any crazy events that were bound to tr intact. I also use $ .makeArray to avoid changing any proto element on the jQuery base object.
$(function(){ $("tbody").each(function(elem,index){ var arr = $.makeArray($("tr",this).detach()); arr.reverse(); $(this).append(arr); }); });
source share