diff --git a/docs/example-widget-filter.html b/docs/example-widget-filter.html
index 95576eda..a1564dc9 100644
--- a/docs/example-widget-filter.html
+++ b/docs/example-widget-filter.html
@@ -220,7 +220,7 @@ $(function(){
(1) You cannot combine these operators with each other (except for the wildcards).
- (2) The filter order (or precendence) of how searches are checked is as follows: regex (/\d/
) > exact ("
) > not match (!
) > operators (< <= >= >
) > and ( AND
) > range ( -
) > wild/or (?
, *
and OR
) > fuzzy (~
); so an exact match will override "and", "or" and "range" searches
+ (2) The filter order (or precendence) of how searches are checked is as follows: regex (/\d/
) > operators (< <= >= >
) > exact ("
) > not match (!
) > and ( AND
) > range ( -
) > wild/or (?
, *
and OR
) > fuzzy (~
); so an exact match will override "and", "or" and "range" searches (*NOTE* order changed in v2.14.6, operators prioritized before exact; see issue #465)
(3) Logical "or" comparisons can now show exact matches (by default; v2.10.1) or just match cell contents.
(4) In tablesorter v2.10, comparisons can be made in date columns (if properly parsed).
diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js
index 8ac0ed9a..b6d35e55 100644
--- a/js/jquery.tablesorter.widgets.js
+++ b/js/jquery.tablesorter.widgets.js
@@ -419,23 +419,6 @@ ts.filter = {
}
return null;
},
- // Look for quotes or equals to get an exact match; ignore type since iExact could be numeric
- exact: function( filter, iFilter, exact, iExact ) {
- /*jshint eqeqeq:false */
- if (ts.filter.regex.exact.test(iFilter)) {
- return iFilter.replace(ts.filter.regex.exact, '') == iExact;
- }
- return null;
- },
- // Look for a not match
- notMatch: function( filter, iFilter, exact, iExact, cached, index, table, wo ) {
- if ( /^\!/.test(iFilter) ) {
- iFilter = iFilter.replace('!', '');
- var indx = iExact.search( $.trim(iFilter) );
- return iFilter === '' ? true : !(wo.filter_startsWith ? indx === 0 : indx >= 0);
- }
- return null;
- },
// Look for operators >, >=, < or <=
operators: function( filter, iFilter, exact, iExact, cached, index, table, wo, parsed ) {
if ( /^[<>]=?/.test(iFilter) ) {
@@ -462,6 +445,23 @@ ts.filter = {
}
return null;
},
+ // Look for quotes or equals to get an exact match; ignore type since iExact could be numeric
+ exact: function( filter, iFilter, exact, iExact ) {
+ /*jshint eqeqeq:false */
+ if (ts.filter.regex.exact.test(iFilter)) {
+ return iFilter.replace(ts.filter.regex.exact, '') == iExact;
+ }
+ return null;
+ },
+ // Look for a not match
+ notMatch: function( filter, iFilter, exact, iExact, cached, index, table, wo ) {
+ if ( /^\!/.test(iFilter) ) {
+ iFilter = iFilter.replace('!', '');
+ var indx = iExact.search( $.trim(iFilter) );
+ return iFilter === '' ? true : !(wo.filter_startsWith ? indx === 0 : indx >= 0);
+ }
+ return null;
+ },
// Look for an AND or && operator (logical and)
and : function( filter, iFilter, exact, iExact ) {
if ( /\s+(AND|&&)\s+/g.test(filter) ) {