jm_ jm_ -5 years ago 175
jQuery Question

Pre-filter in Tablesorter

How can I apply a non interactive default filter to Tablefilter?

Something like

show rows where field_1="variable"
but stablished by default when the table is loaded.


Answer Source

If I understand what you are asking, you can set the header class to "filter-false" to disable the filter in that column; then set the desired filters after the table initializes (demo):

    theme: 'blackice',
    widgets: ['zebra', 'filter'],
    initialized: function (table) {
        $.tablesorter.setFilters( table, ['abc'], true);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download