Search code examples
javascriptjquerycsstablesorter

jquery tablesorter class sticky-false


I'm using jquery plugin tablesorter with the sticky headers widget . In the documentation it is stated that a class called sticky-false was added . But I cant manage to hide the sticky-headers on specific columns.,

I have no options set on my javascript and I start tablesorter like this. ... Works.

$('#table').tablesorter({widgets: ['zebra','stickyHeaders', 'filter'] }

and on my table add the following, ... sticky-false wont work, other two work but input box doesnt dissapear

<th class="sticky-false filter-false sorter-false">Table</th>

Im using TableSorter 2.14.5 and tableSorter 2.8+ widgets

Anyone knows a way to hide the input box?


Solution

  • The "sticky-false" class is meant for an entire row, not an individual column.

    <tr class="sticky-false">
        <th class="sorter-false" colspan="5">This row will not be sticky</th>
    </tr>
    <tr>
        <th class="filter-false sorter-false">Column 1</th>
        ...
        <th>Column 5</th>
    </tr>
    

    If you want to hide a column filter, use the following css:

    .tablesorter-filter-row .disabled { display: none; }