This is a lot of fun. See the readme for explanations.
var nameTable, names = [
{name:'Bill',age:42},
{name:'Jeff',age:19},
{name:'Maggie',age:28}
];
$(function(){
nameTable = new BTS.SortableTable({
el: $('#ageTable'),
tableClass:'table table-bordered table-striped',
collection: new BTS.SortableList(names)
});
nameTable.sortBy('age');
});
Lets blow our last example out of the water. I want to extend the SortableTable() class itself. I'm sick of these single state rows, I need something more dynamic. Behold the ExpandableTable() and Expanded Views