Demo: http://jsfiddle.net/fKMqD/
Code:
var rows = $('tr');
rows.eq(0).find('td').sort(function(a, b){
return $.text([a]) > $.text([b]) ? 1: -1;
}).each(function(newIndex){
var originalIndex = $(this).index();
rows.each(function(){
var td = $(this).find('td');
if (originalIndex !== newIndex)
td.eq(originalIndex).insertAfter(td.eq(newIndex));
});
});
No plugins necessary.
J-P
2010-06-27 15:15:03