I have a simple table that contains
ID and Name (FirstName + LastName) fields. Above the table I have a dropdown list with Options ID, FirstName , LastName. Based o
Maybe this is what you wanted (demo)?
HTML
Script
$(function(){
$('table').tablesorter();
$('select').change(function(){
var column = parseInt($(this).val(), 10),
direction = 1, // 0 = descending, 1 = ascending
sort = [[ column, direction ]];
if (column >= 0) {
$('table').trigger("sorton", [sort]);
}
});
});