adding sorting ability to bootstrap table
In fact, it can be used for any tables.
This project is inspired by HTML Kickstart (http://www.99lime.com/elements/) and its sortable table. I took the css and js part from there and stripped the unnecessary formating related to Kickstart.
Using:
Add references to bootstrap-sortable.css and bootstrap-sortable.js to your page. Add class "sortable" to your bootstrap table.
When you add table rows or whole table from client side, use $.bootstrapSortable()
function to add sortability to parts/tables that were not present at document.ready
You can preset one column to be sorted when table is loaded this way:
<th> Column 1</th>
<th> Column 2</th>
<th data-defaultsort="desc"> Column 3</th>