One of my recent web development tasks is to click on html table column headers to make them sortable.
What I was doing originally was to make id to each header, and pass that id with jQuery Ajax function to reload the page so that the column with related id would be sorted. In this case, I still used MVC structure to handle table sorting in CONTROLLER and return the sorted information back to VIEW by reloading the page. This approach was time-consuming, and negatively affected website running performance.
jQuery Table Sorter, developed by Christian Bach, has its unique way for solving table sorting dynamically by loading the table in VIEW for only one time. This approach makes sure everything about table value sorting is running in client side, thus the performance is super fast. And with some CSS work, ascending and descending buttons can be displayed with arrows. So the final result looks great. The page is easier to load, and data is easier to compare with different sorting orders.
The simple example: /stuff/tablesort/
jQuery Table Sort official site: http://tablesorter.com/docs/