Fortunately there's a pretty nice solution.
Tablesorter is an excellent jQuery plugin created by Christian Bach. It can turn any standard HTML table into a fully sortable table without page refresh.
All we need to do is include the source file and apply it's tablesorter() method on the desired table(s).
Of course, it has a bunch of useful settings which are fairly described in the documentation.