Skip to content Skip to sidebar Skip to footer

How Can I Make An HTML Table Sortable With Javascript Without Loading Data Via AJAX?

How can I make a table sortable using javascript without loading data via AJAX? More specifically, I'm looking for a solution that gives me the following: Works on a plain old HT

Solution 1:

The jquery plugin tablesorter works very nicely.


Solution 2:

Tablesorter is a jQuery plugin which works similar to sortable.js, turning a normal HTML table into a sortable one.


Solution 3:

Updated link (note this is not https://github.com/SortableJS/Sortable): Try sortable.


Solution 4:

Along with OrbMan's answer, you can look at wikibits.js, which is MediaWiki's version of the sorting code. It doesn't require any AJAX or special glue code, just a simple class (sortable) to designate sortable tables.

The code is freely licensed, and used in production all over the Wikimedia sites.

EDIT: MediaWiki switched to a version of Tablesorter starting in 86088 (April 2011).


Solution 5:

I really like tristen's tablesort. It is dependency free, lightweight and doesn't require a lot of styling / doesn't mess with your own styling!


Post a Comment for "How Can I Make An HTML Table Sortable With Javascript Without Loading Data Via AJAX?"