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 of the excellent dragtable plugin, but I don’t need something that allows the user to move columns, I need something that will do the re-ordering in a configurable way.
The idea is to walk over all rows (tr’s) of the table and swap the desired td’s. Let’s swap column 2 and column 4:
I hope this helps.