"th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc.
+ Warning What won't work is if you try to target the header using a filtering selector that uses an index, e.g. "th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc.
{name}
, the widget will automatically be added to the table (v2.18.0)
"basic"
(the default), the textExtraction code will check for data-attributes, otherwise, any other string value setting will skip the data-attribute value check; because of this change, there is a noticable lessening of initialization time in Internet Explorer.
+ In v2.19.0, the code was further optimized. When set to "basic"
(the default), the textExtraction code will check for data-attributes, otherwise, any other string value setting will skip the data-attribute value check; because of this change, there is a noticable lessening of initialization time in Internet Explorer.
In v2.17.0, the textExtraction
column can also be referenced by using a jQuery selector (e.g. class name, id or column index) that points to a table header cell.textExtraction : { @@ -1608,7 +1608,7 @@ $.extend($.tablesorter.themes.jui, { return $(node).find('img').attr('title'); } }- Warning What won't work is if you try to target the header using a filtering selector that uses an index, e.g.
"th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc."th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc.parser-input-select.js
file (v2.22.2; v2.25.0).
When using the checkbox parser, this class name is added to the row along with this class name plus the column index when the targeted checkbox is checked.
-For example, if the named parser file has been loaded & "sorter-checkbox" class is added to the first column header, then any checked checkbox in the first column will have "checked checked-0"
class names added to the row.
For example, if the named parser file has been loaded & "sorter-checkbox" class is added to the first column header, then any checked checkbox in the first column will have "checked checked-0"
class names added to the row.
config.parsers
).
{query}
or {q}
to maintain positioning"~{query}"
(default fuzzy search) or end "{q}="
(default exact search)"~{query}"
(default fuzzy search) or end "{q}="
(default exact search){q}
tag."{q} OR {q}"
."a b c d"
the column will be filtered using "a OR b OR c OR d"
, so there is no need to add more {q}
tags within the string; adding more will likely mess up the results."a"
, then the column will be filtered using "a OR a"
so as not to cause other issues."{q} OR {q}"
."a b c d"
the column will be filtered using "a OR b OR c OR d"
, so there is no need to add more {q}
tags within the string; adding more will likely mess up the results."a"
, then the column will be filtered using "a OR a"
so as not to cause other issues.{q}*
and {q}?
are essentially the same as {q}
.and
- logical " AND "
or &&
type filter.exact
- exact match (using "
or =
).and
- logical " AND "
or &&
type filter.exact
- exact match (using "
or =
).fuzzy
- fuzzy match (~
)notMatch
- not match (!
or !=
)operators
- comparison filters (< <= >= >
)data-column="#"
, where the #
targets the column (zero-based index), pointing to a specific column to search.data-column="#"
, where the #
targets the column (zero-based index), pointing to a specific column to search.<input class="search" type="search" data-column="0" placeholder="Search first column">If you want to search all columns, using the updated "any match" method, set the data column value to "all":
<input class="search" type="search" data-column="all" placeholder="Search entire table">@@ -2627,7 +2627,7 @@ filter_cssFilter : [ '', 'hidden', '', 'hidden' ] }); } } - Warning What won't work is if you try to target the header using a filtering selector that uses an index, e.g.
"th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc."th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc.filter_formatter
option."th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc."th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc."filter_functions"
option in three different ways:
or
or |
), or a range delimiter ( -
or to
) within the search query."
or =
) or a logical not search (!
)."
or =
) or a logical not search (!
).>=-10
) or less than or equal to a positive number (<=10
).filter_selectSource : { ".model-number" : [ "abc", "def", "ghi", "xyz" ] }- Warning What won't work is if you try to target the header using a filtering selector that uses an index, e.g.
"th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc."th:eq()"
, ":gt()"
, ":lt()"
, ":first"
, ":last"
, ":even"
or ":odd"
, ":first-child"
, ":last-child"
, ":nth-child()"
, ":nth-last-child()"
, etc.filter_functions
column value is set to true
If a value is set in this option, the storage widget looks in that defined table data-attribute for a table id.
-If this option is not defined, then the default data-attribute for the table becomes "data-table-group"
.
If this option is not defined, then the default data-attribute for the table becomes "data-table-group"
.
The value in the data-attribute sets a table id, if not found, the storage widget then looks for an id in the storage_tableId
option.
If a value is set in this option, the storage widget looks in that defined table data-attribute for a table url.
-If this option is not defined, then the default data-attribute for the table becomes "data-table-page"
.
If this option is not defined, then the default data-attribute for the table becomes "data-table-page"
.
The value in the data-attribute sets a table url, if not found, the storage widget then looks for a url in the storage_fixedUrl
option.
widgetOptions
and accessed via widgetOptions.pager_ajaxUrl
ajaxUrl
string are optional. If do not want the user to change the page size, then you only need to include the page in this string:
- ajaxUrl: "http://mydatabase.com?start={page}"+
ajaxUrl: "http://mydatabase.com?start={page}"If you need to send your server a page offset (actual starting record number), then you'll need to use the
customAjaxUrl
option.ajaxProcessing
function:
@@ -4008,6 +4007,33 @@ $('table').trigger('search', false);
processAjaxOnInit
is set to false
, set this option to contain the total number of rows and filtered rows to prevent an initial ajax call (v2.25.4).
+ widgetOptions
and accessed via widgetOptions.pager_initialRows
+ Use this option as follows:
+$(function(){ + $("table") + .tablesorter() + .tablesorterPager({ + processAjaxOnInit: false, + initialRows: { + total: 100, + filtered: 100 + }, + // other ajax settings... + }); +});+
Internal list of all table header cells (v2.8)
- *NOTE* The header cells within rows with the cssIgnoreRow class (default is "tablesorter-ignoreRow" will not be included in this variable.
Header cells in not-ignored rows are targeted using the jQuery selector from the thead markup, the header-index counts the header th cells and does not actually match the data-column index when extra rows and/or colspan or rowspan are included in any of the header cells:
<thead> @@ -6277,7 +6302,7 @@ var wo = $('#mytable').data('tablesorter').widgetOptions; |