<li>The <code>filter_anyMatch</code> widget option was completely <spanclass="label alert">removed</span>. Sorry for not deprecating this option, but the filter any match code was completely rewritten.</li>
<li>Added a <code>filter_external</code> widget option to only accept a jQuery selector string/object; please see the updated <ahref="example-widget-filter-any-match.html">filter any match</a> demo for more details.</li>
<li>Added & set <code>filter_saveFilters</code> to <code>true</code> (default is <code>false</code>) in this demo (<spanclass="version">v2.14</span>).</li>
<li>Hover over the grey bar below the table header to open the filter row. Disable this by setting <code>filter_hideFilters</code> option to <code>false</code>.</li>
<li>This widget uses jQuery's <code>.nextUntil()</code> function which is only available is jQuery version 1.4+.</li>
<li>This widget does work with tablesorter v2.0.5.</li>
<tr><tdclass="center">text</td><td>Any text entered in the filter will <strong>match</strong> text found within the column</td><td><code>abc</code> (finds "abc", "abcd", "abcde", etc); <buttondata-filter-column="1">Aaron</button> (finds "Aaron" and "Philip Aaron Wong")</td></tr>
<tr><tdclass="center"><code>~</code></td><td>Perform a fuzzy search (matches sequential characters) by adding a tilde to the beginning of the query (<spanclass="version">v2.13.3</span>)</td><td><buttondata-filter-column="1">~bee</button> (matches "Bruce Lee" and "Brenda Dexter") or <buttondata-filter-column="1">~piano</button> (matches "Philip Aaron Wong")</td></tr>
<tr><tdclass="center"><code>"</code></td><td>To exactly match the search query, add a quote, apostrophe or equal sign to the beginning and/or end of the query</td><td><code>abc"</code> or <code>abc=</code> (exactly match "abc"); <buttondata-filter-column="1">John"</button> or <buttondata-filter-column="1">John=</button> (exactly match "John")</td></tr>
<tr><tdclass="center"><code>?</code></td><td>Wildcard for a single, non-space character.</td><td><code>J?n</code> (finds "Jan" and "Jun", but not "Joan"); <buttondata-filter-column="2">a?s</button> (finds "Dumass" and "Evans", but not "McMasters")</td></tr>
<tr><tdclass="center"><code>*</code></td><td>Wildcard for zero or more non-space characters.</td><td><code>B*k</code> (matches "Black" and "Book"); <buttondata-filter-column="2">a*s</button> (matches "Dumass", "Evans" and "McMasters")</td></tr>
<tr><tdclass="center"><code>/\d/</code></td><td>Add any regex to the query to use in the query</td><td><code>/b[aeiou]g/i</code> (finds "bag", "beg", "BIG", "Bug", etc); <buttondata-filter-column="1">/r$/</button> (matches text that ends with an "r")</td></tr>
<tr><tdclass="center"><code><<= >= ></code></td><td>Find alphabetical or numerical values less than or greater than or equal to the filtered query <smallclass="bright">(2)</small>.</td><td><buttondata-filter-column="5">>= 10</button> (find values greater than or equal to 10)</td></tr>
<tr><tdclass="center"><code>!</code></td><td>Not operator. Filter the column with content that <strong>do not</strong> match the query.</td><td><code>!fe</code> (hide rows with "female" in that column, but shows rows with "male"); <buttondata-filter-column="1">!a</button> (find text that doesn't contain an "a")</td></tr>
<tr><tdclass="center"><code> && </code> or <code> AND </code></td><td>Logical "and". Filter the column for content that matches text from either side of the operator.</td><td><code>box && bat</code> (matches a column cell that contains both "box" and "bat"); <buttondata-filter-column="1">Br && c</button> (Find text that contains both "br" and "c")</td></tr>
<tr><tdclass="center"><code>|</code> or <code> OR </code></td><td>Logical "or" (Vertical bar). Filter the column for content that matches text from either side of the bar <smallclass="bright">(3)</small>.</td><td><code>box|bat</code> (matches a column cell with either "box" or "bat"); <buttondata-filter-column="1">Alex|Peter</button> (Find text that contains either "Alex" or "Peter")</td></tr>
<tr><tdclass="center"><code> - </code> or <code> to </code></td><td>Find a range of values. Make sure there is a space before and after the dash (or the word "to") <smallclass="bright">(4)</small>.</td><td><buttondata-filter-column="3">10 - 30</button> or <buttondata-filter-column="4">10 to 30</button> (match values between 10 and 30)</td></tr>
<spanclass="bright">(2)</span> The filter order (or precendence) of how searches are checked is as follows: <spanclass="smallcode">regex (<code>/\d/</code>) <strong>></strong> operators (<code><<= >= ></code>) <strong>></strong> exact (<code>"</code>) <strong>></strong> not match (<code>!</code>) <strong>></strong> and (<code> AND </code>) <strong>></strong> range (<code> - </code>) <strong>></strong> wild/or (<code>?</code>, <code>*</code> and <code> OR </code>) <strong>></strong> fuzzy (<code>~</code>); so an exact match will override "and", "or" and "range" searches </span> (*NOTE* order changed in <spanclass="version updated">v2.15</span>, operators prioritized before exact; see <ahref="https://github.com/Mottie/tablesorter/issues/465">issue #465</a>) <br>
<spanclass="bright">(3)</span> Logical "or" comparisons can now show exact matches (by default; <spanclass="version">v2.10.1</span>) or just match cell contents.<br>
<spanclass="bright">(4)</span> In tablesorter <spanclass="version">v2.10</span>, comparisons can be made in date columns (if properly parsed).
<li><del><code>filter_anyMatch : null</code></del> - jQuery selector string (or jQuery object) of external anyMatch filter (<spanclass="label alert">removed</span> in v2.15; please see <ahref="example-widget-filter-any-match.html">the demo</a> for more details).</li>
<li><code>filter_cssFilter : ''</code> - extra css class name(s) applied to the table row containing the filters & the inputs within that row. This option can either be a string (class applied to all filters) or an array (class applied to indexed filter).</li>
<li><code>filter_defaultAttrib : 'data-value'</code> - this option contains the name of the data-attribute which contains the default (starting) filter value.</li>
<li><code>filter_external : ''</code> - jQuery selector (or object) pointing to an input to be used to match the contents of any column; please refer to the updated <ahref="example-widget-filter-any-match.html">filter-any-match demo</a> for limitations (<spanclass="version">v2.15</span>).</li>
<li><code>filter_hideFilters : false</code> - if true, filters are hidden initially, but can be revealed by clicking on the filter icon <spanclass="remark">*</span>.</li>
<li><code>filter_liveSearch : true</code> - if true, search column content while the user types (with a delay). If false, the user must press enter to start the search. If set to a number, when the length of the input text reaches this minimum length, a search will initiate.</li>
<li><code>filter_onlyAvail : 'filter-onlyAvail'</code> - a header with a select dropdown & this class name will only show available (visible) options within that drop down.</li>
<li><code>filter_serversideFiltering : false</code> - if true, filter will be done server-side. The client-side filtering will be disabled, but the ui and events will still be used.</li>
<!-- <span class="alert">Caution</span>: In my testing, it appears that Chrome does not properly render a previously hidden search input text properly (<a href="http://jsfiddle.net/Mottie/Mjbab/1/">demo</a>), so for now, I'm changing this demo's <code>filter_hideFilters</code> option to <code>false</code> until the source of this problem is determined. -->
<li><code>filter-false</code> - disable the filter for a specific header column.</li>
<li><code>filter-select</code> - build a default select box for a column (shows unique column content). See the <ahref="example-widget-filter-custom.html">custom filter widget</a> demo for an example.</li>
<li><code>filter-match</code> - applies to "filter-select" columns and columns where the user can use the logical "or" search. Makes the filter/select match the column contents instead of exactly matching.</li>
<li><code>filter-onlyAvail</code> - show only available (visible) options within a default select box. See the <ahref="example-widget-filter-custom.html">custom filter widget</a> demo "Discount" column for an example.</li>
* Note: using this search method will update the contents of the filters within the filter row.<br>
<br>
In <spanclass="version updated">v2.15</span>, one additional parameter can be added to the array to perform an "any-match" of the table; <spanclass="label warning">Warning!</span> please note that if no external input (with a <code>data-column="all"</code> is attached using <ahref="index.html#function-bindsearch"><code>bindSearch</code></a> function) is visible, the user will not know that a filter has been applied. <preclass="prettyprint lang-js">// in a table with 4 columns; set the 5th parameter to any-match
$('table').trigger( 'search', [['', '', '', '', 'orange']] ); // find orange in any column</pre>
This method returns an array of filter values or <code>false</code> if the selected table does not contain a filter row.<br>
<br>
Internally, the get filters functions returns the filters stored within this table data <code>$('table').data('lastSearch')</code>, unless an additional parameter of <code>true</code> is passed to the function:
<preclass="prettyprint lang-javascript">$.tablesorter.getFilters( $('table'), true ); // get current input values instead of data stored filters</pre>
As of <spanclass="version updated">v2.15</span>, if an external "any-match" filter (see <code>filter_external</code> widget option) is included, one additional array parameter will be returned in the filter - the value of the any match search.
<preclass="prettyprint lang-js">// in a table with six columns, this function will return an array with seven
Set the values of the actual filters using this method; include a <code>true</code> boolean to actually apply the search (<spanclass="version">v2.9</span>).
This method returns <code>true</code> if the filters were sucessfully applied, or <code>false</code> if the table does have a filter row.<br>
<br>
As of <spanclass="version updated">v2.15</span>, if an external "any-match" filter (see <code>filter_external</code> widget option) is included, add an additional array parameter to set that filter; so if a table has six columns, add the any-match search as the seventh value.
<preclass="prettyprint lang-js">// in a table with 6 columns, the 7th filter will apply
// to the any-match filter & match any table column with "11"
Use this method to bind external search filters; include a data-attribute <code>data-column</code> with the column index to target, or use <code>data-column="all"</code> to preform an "any-match" search (<spanclass="version updated">v2.15</span>). If no <code>data-column</code> is added to the input, the input will be ignored.
<preclass="prettyprint lang-html"><!-- will perform an "any-match" type of search (matches any column) -->
<buttontype="button"class="toggle fic">Toggle</button> filter_ignoreCase : <spanid="case">true</span> (if false, the search will be case sensitive)<br>
<buttontype="button"class="toggle ffm">Toggle</button> filter-match (if class name added to the "First Name" column, all "or" searches will only match the content; Search <buttondata-filter-column="1">alex|br*|c</button> in the First Name column (<spanclass="version">2.10.1</span>).