Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client side sorting with html and Javascript

How can I make a html table which the user can sort using the column headers to sort on the client side? I can load all rows' html data into a Javascript array and use dom to add a table to a content div but is it the right way? If you list major methods, I can find my way from there so, I'm not asking for code.

like image 264
Uğur Gümüşhan Avatar asked Mar 15 '26 03:03

Uğur Gümüşhan


2 Answers

http://tinysort.sjeiti.com/ should be usefully

like image 82
Sender Avatar answered Mar 16 '26 17:03

Sender


No need to reinvent the wheel in case you utilise a JS Framework already, but here are quite some nice solutions:

TableSort - http://www.frequency-decoder.com/demo/table-sort-revisited/

JQuery tablesorter - http://tablesorter.com/docs/#Demo

GridView3 - http://dev.sencha.com/playpen/ext-2.0/examples/grid/grid3.html

Stuart Langridge's Script - http://yoast.com/articles/sortable-table/

Mootools Mootable - http://joomlicious.com/mootable/

like image 28
stevek-pro Avatar answered Mar 16 '26 16:03

stevek-pro