Home » Tables » Javascript Tablesorter Filter_Functions

Javascript Tablesorter Filter_Functions

As of tablesorter v2.

9, this widget can no longer be applied to versions of tablesorter prior to version 2.

8.

Custom filter widget option filter_functions was added in version 2.

3.

6.

jQuery v1.

4.

3+ required.

, So, seems I needed to update to a new version of TableSorter for the getFilters function, and now my filtering widget stuff wont work (but sorting and child rows still work).

Digging in but I had thought pointing the script src to the 2.

25.

2 version of jquery.

tablesorter.

js and jquery.

tablesorter.

widgets.

js would have worked with out any code change.

edit: also updated to jquery-1.

12.

0.

, As of tablesorter v2.

9, this widget can no longer be applied to versions of tablesorter prior to version 2.

8.

Custom filter widget option filter_functions was added in version 2.

3.

6.

jQuery v1.

4.

3+ required.

, Changed to empty string in v2.

11, as the ” tablesorter -header” class will always be added to the table headers; this option now contains any additional class names to add.

Example from the blue theme:.

tablesorter -blue.

tablesorter -header { background-color: #99bfe6; background-repeat: no-repeat; background-position: center right; padding: 4px 20px 4px 4px; white-space: normal; cursor: pointer; }, filter_hideEmpty: true: Hide filter row when the table is empty (v2.

15).

filter_hideFilters: false: If true, filters are hidden initially, but can be revealed by hovering over the filter row, or giving a filter input focus (tabbing down the page).

In v2.

26.

6, a function can now be used to return a boolean value to set the visibility of the filter row.

See the main documentation for an example.

, Tablesorter Playgrounds.

Use these demos to try out the available options.

NOTE some of these demos will not work over an HTTPS protocol! Basic demos.

tablesorter basic – test all options & widgets (except the uitheme widget).

tablesorter UI theme – test out the jQuery UI theme widget; separate because of the different stylesheets.

, cssChildRow: String ” tablesorter -childRow” Add this css class to a child row that should always be attached to its parent.

Click on the “cssChildRow” link to toggle the view on the attached child row.

javascript tablesorter filter_functions