Does anyone know a way to re-order table columns, using jQuery?
I don\'t mean sort - I mean dynamically move entire columns left or right in a table.
I\'m aware
This code should work for you.
$("table tr").each(function () {
$(this).find("td").eq(1).after($(this).find("td").eq(0));
});
$("table tr").each(function () {
var rows = $(this).find("td");
rows.eq(1).after(rows.eq(0));
});