I am using the tablesorter jquery plugin paired with this great tablesorter filter plugin.
I have a select box on my page that contains a list of all the columns of my table. I want to be able to limit the filter to only the selected column when the user chooses to select it.
So far I have attached an event to the select box like so:
$('#SelectedColumn').bind("change", columnSelected);
With a handler like so:
function columnSelected() {
var selected = $(this).val();
$.tablesorterFilter.defaults.filterColumns = [selected];
}
This does correctly set the default value for the filter column but when the filter happens it doesn't actually use that value. It appears the plugin allows you to set filtered columns only on construction. Or my jquery newbiness cant figure out how to get at the bit of data I need to flip.