<iframeclass="github-btn"src="http://ghbtns.com/github-btn.html?user=mottie&repo=tablesorter&type=fork&count=true"width="90"height="20"title="Fork on GitHub"></iframe>
<iframeclass="github-btn"src="http://ghbtns.com/github-btn.html?user=mottie&repo=tablesorter&type=watch&count=true"width="100"height="20"title="Star on GitHub"></iframe>
tablesorter is a <aclass="external"href="http://jquery.com">jQuery</a> plugin for turning a
standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes.
tablesorter can successfully parse and sort many types of data including linked data in a cell.
It has many useful features including:
</p>
<ul>
<li>Multi-column sorting</li>
<li>Multi-tbody sorting - see the <ahref="#options">options</a> table below</li>
<li>Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. <ahref="example-parsers.html">Add your own easily</a></li>
<spanclass="label label-info">TIP!</span> Sort multiple columns simultaneously by holding down the <kbd>Shift</kbd> key and clicking a second, third or even fourth column header!
<spanclass="label label-info">NOTE!</span> tablesorter will auto-detect most data types including numbers, dates, ip-adresses for more information see <ahref="#Examples">Examples</a>
<li>Sort direction (using <ahref="#sortinitialorder"><code>sortInitialOrder</code></a> option [<ahref="example-option-sort-order.html">demo</a>], or <ahref="example-options-headers-order.html">other methods</a>)</li>
</ul>
</li>
<li>Prevent or reset a sort:
<ul>
<li><ahref="example-option-sortreset-sortrestart.html">Using sortReset & sortRestart options</a> (<ahref="#sortreset"><code>sortReset</code></a>&<ahref="#sortrestart"><code>sortRestart</code></a>)</li>
<li><ahref="example-method-sortreset.html">Resetting the entire table sort</a> (<ahref="#sortreset-method"><code>sortReset</code></a> method; v2.4.7)</li>
<li><ahref="example-options-headers-digits-strings.html">Dealing with text strings in numerical sorts</a> (<ahref="#stringto"><code>stringTo</code></a>; v2.0.10)</li>
<spanclass="xsmall">* widgets with an asterisk are in the <code>jquery.tablesorter.widgets.js</code> file (except for extra filter formatter functions)</span></h4>
<li><ahref="example-parsers-dates.html">Assorted date parsers</a> (<spanclass="version">v2.8</span>; <spanclass="version updated">v2.14</span>; includes weekday, month, two-digit year &<ahref="http://sugarjs.com/dates">sugar.js</a> date parsers).</li>
<li><ahref="example-parsers-ignore-articles.html">Ignore leading articles parser</a> (Ignore "A", "An" and "The" in titles) (<spanclass="version">v2.8</span>).</li>
<li><ahref="example-ajax.html">Appending table data with ajax</a> (<ahref="#update"><code>update</code></a>)</li>
<li><ahref="example-add-rows.html">Adding a table row</a> (<ahref="#addrows"><code>addRows</code></a>; v2.0.16)</li>
<li><ahref="example-update-all.html">Update an entire table column (<code>thead</code> and <code>tbody</code>)</a> (<ahref="#updateall"><code>updateAll</code></a>; <spanclass="version">v2.8</span>)</li>
<li><ahref="example-update-cell.html">Update the table after cell content has changed</a> (<ahref="#updatecell"><code>updateCell</code></a>)</li>
<li><ahref="example-option-render-header.html">Modifying the Header during rendering</a> (<ahref="#onrenderheader"><code>onRenderHeader</code></a>)</li>
<li><ahref="example-option-render-template.html">Modifying the Header using a template</a> (<ahref="#headertemplate"><code>headerTemplate</code></a>; v2.7)</li>
<li>*Note* you can use class names (version 2.0.11+, <ahref="example-parsers-class-name.html">demo</a>), or jQuery data (version 2.3+, <ahref="example-parsers-jquery-data.html">demo</a>) instead of meta data</li>
<li><ahref="example-meta-sort-list.html">Set a initial sorting order using metadata.</a></li>
<li><ahref="example-meta-headers.html">Disable header using metadata</a></li>
<li><ahref="example-meta-parsers.html">Setting column parser using metadata</a></li>
<li><spanclass="label label-info">Beta</span><ahref="../beta-testing/example-pager-custom-controls.html">Custom pager control script</a></li>
<li><spanclass="label label-info">Beta</span><ahref="../beta-testing/example-external-filters-using-select2.html">External filters using Select2 plugin</a> (<spanclass="version updated">v2.15</span>)</li>
<li><spanclass="label label-info">Alpha</span><ahref="../beta-testing/example-widget-column-reorder.html">Column reorder widget</a> - not working 100% with sticky headers</li>
<li><spanclass="label label-info">Alpha</span><ahref="../beta-testing/example-widget-sum-columns.html">Column sum widget</a> - still needs LOTS of work!</li>
<spanclass="label label-info">TIP!</span> Click on the link in the property column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
Changed to empty string (<code>""</code>) in v2.11, as the <code>"tablesorter-headerAsc"</code> class will always be added to a header cell with an ascending sort; this option now contains any additional class names to add.
Default changed v2.5 to <code>"tablesorter-headerAsc"</code>. Default changed v2.1.7 to <code>"tablesorter-headerSortUp"</code>. Original default: <code>"headerSortUp"</code></div>
<td>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. Previous default was <code>"expand-child"</code> (Changed in v2.4).</td>
Changed to empty string in v2.11, as the <code>"tablesorter-headerDesc"</code> class will always be added to a header cell with a descending sort; this option now contains any additional class names to add.
Default changed v2.5 to <code>"tablesorter-headerDesc"</code>. Default changed v2.1.7 to <code>"tablesorter-headerSortDown"</code>. Original default: <code>"headerSortDown"</code></div>
<td>Additional CSS class applied to style the headers - <spanclass="version updated">v2.11</span>
<divclass="collapsible"><br>
Changed to empty string in v2.11, as the <code>"tablesorter-header"</code> class will always be added to the table headers; this option now contains any additional class names to add.
<td>Additional CSS class applied to style the header row - <spanclass="version updated">v2.11</span>
<divclass="collapsible"><br>
Changed to empty string in v2.11, as the <code>"tablesorter-headerRow"</code> class will always be added to a table header row; this option now contains any additional class names to add.<br>
<p>This CSS style was added in v2.4, prior to that the row would get the same class as the header cells. This class was added to make it easier to determine what element was being targeted in the plugin.</p>
As of v2.4, an <code><i></code> element, with this class name, is automatically appended to the header cells. To prevent the plugin from adding an <code><i></code> element to the headers, set the <code>cssIcon</code> option to an empty string.<br>
In v2.7, the icon will only be added to the header if <strong>both</strong> the <code>cssIcon</code> option is set AND the <code>headerTemplate</code> option includes the icon tag (<code>{icon}</code>).
<td>Additional CSS class applied to style the header when no sort is applied (<spanclass="version">v2.15</span>).
<divclass="collapsible"><br>
A <code>"tablesorter-headerUnSorted"</code> class will always be added to an unsorted header cell; this option contains any additional class names to add. Currently, no themes use this class name.
<td>Additional CSS class applied to style the header cell while it is being sorted or filtered - <spanclass="version updated">v2.11</span>
<divclass="collapsible"><br>
Changed to empty string in v2.11, as the <code>"tablesorter-processing"</code> class will always be added to a table cells during processing; this option now contains any additional class names to add.<br>
<p>This class name is added to the header cell that is currently being sorted or filted. To prevent this class name from being added, set the <ahref="#showprocessing"><code>showProcessing</code></a> option to <code>false</code> (v2.4).</p>
As an example, I've split up this options table into three (3) tbodies. The first contains the active options, the second is the info block with a row that only contains the text "Deprecated Options", and the last tbody contains the deprecated options. Sort the table to see how each tbody sorts separately.
<spanclass="label label-info">NOTE!</span> The pager plugin will only be applied to the first tbody, as always. I may work on modifying this behavior in the future, if I can figure out the best implementation.
In previous versions, this option was set as "us", "uk" or "dd/mm/yy". This option was modified to better fit needed date formats. It will only work with four digit years!<br>
The sorter should be set to "shortDate" and the date format can be set in the "dateFormat" option or set for a specific columns within the "headers" option.
Setting this option to true will delay parsing of all table cell data until the user initializes a sort. This speeds up the initialization process of very large tables, but the data still needs to be parsed, so the delay is still present upon initial sort.
For example, to disable sorting on the first two columns of a table: <code>headers: { 0: { sorter: false}, 1: {sorter: false} }</code>.<br>
<br>
The plugin attempts to detect the type of data that is contained in a column, but if it can't figure it out then it defaults to alphanumeric. You can easily override this by setting the header argument (or column parser).
See the full list of <ahref="#parsers">default parsers</a> here or <ahref="example-parsers.html">write your own</a>.
Please note that the headers index values corresponds to the table header cells index (zero-based) and <strong>not</strong> the actual columns. For example, given the following table <code>thead</code> markup, the <code>header-index</code> counts the header <code>th</code> cells and does not actually match the <code>data-column</code> index when extra rows and/or <code>colspan</code> or <code>rowspan</code> are included in any of the header cells:
So, in the above example, to disable the sort of the second table column (<code>data-column</code> index of 1), the header cell of index 2 needs to be set as follows: <code>2 : { sorter : false }</code>.
<code>{content}</code> will be replaced by the current header HTML content.<br>
<code>{icon}</code> will be replaced by <code><i class="tablesorter-icon"></i></code>, but only if a class name is defined in the <code>cssIcon</code> option.<br>
After the template string is built, the <code>onRenderTemplate</code> function is called to allow further manipulation. Please read more about this <ahref="#onrendertemplate"><code>onRenderTemplate</code> function</a> and/or check out the example (link to the right).
<td>Apply widgets after table initializes (v2.3.5).
<divclass="collapsible">
When true, all widgets set by the <code>widgets</code> option will apply after tablesorter has initialized, this is the normal behavior.<br>
<br>
If false, the each widget set by the <code>widgets</code> option will be initialized, meaning the "init" function is run, but the format function will not be run. This is useful when running the pager plugin after the table is set up. The pager plugin will initialize, then apply all set widgets.<br>
<br>
Why you ask? Well, lets say you have a table with 1000 rows that will have the pager plugin applied to it. Before this option, the table would finish its setup, all widgets would be applied to the 1000 rows, pager plugin initializes and reapplies the widgets on the say 20 rows showing; making the widget application to 100 rows unnecessary and a waste of time. So, when this option is false, widgets will only be applied to the table after the pager is set up.
This function is called after content is to the TH tags (after the template is procressed and added). You can use this to modify the HTML in each header tag for additional styling.
In versions 2.0.6+, all TH text is wrapped in a div with a class name of "tablesorter-inner" by default. In the example below, the header cell (TH) div is given a class name (<ahref="http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm">source</a>).
<small>* Note: this function adds additional rendering time to the table if any DOM manipulation is done. Because this time will be on top of the processing time already added by the template.</small>
This function is called after the template string has been built, but before the template string is applied to the header and before the <code>onRenderHeader</code> function is called (v2.7).
The <code>onRenderTemplate</code> function receives a column index and template string parameters. The template string, from the <ahref="#headertemplate"><code>headerTemplate</code> option</a>, will already have the <code>{icon}</code> and <code>{content}</code> tags replaced; it's just a string of formatted HTML. When done manipulating this string, return it. Here is an example:
});</pre>The <code>template</code> parameter can be manipulated as a string, or if you prefer, turn it into a jQuery object (<code>var $t = $(template)</code>) to find and replace content as desired. Just make sure you return a string (<code>return $t.html()</code>)<br>
From the example function above, you'll end up with something similar to this HTML (only the thead is shown)<preclass="prettyprint lang-html"><thead>
<br>Added <code>></code> to the selector in v2.3 to prevent targetting nested table headers. It was modified again in v2.4 to include <code>td</code> cells within the thead.
<td>This CSS class name can be applied to all rows that are to be removed prior to triggering a table update. (v2.1).
<divclass="collapsible">
<br>
It was necessary to add this option because some widgets add table rows for styling (see the <ahref="example-widgets.html">writing custom widgets demo</a>) and if a table update is triggered (<code>$('table').trigger('update');</code>) those added rows will automatically become incorporated into the table.
<td>Show an indeterminate timer icon in the header when the table is sorted or filtered. Please note that due to javascript processing, the icon may not show as being animated. I'm looking into this further and would appreciate any feedback or suggestions with the coding (v2.4).</td>
<td>Use to add an additional forced sort that is <strong>prepended</strong> to <ahref="#sortlist"><code>sortList</code></a>.
<divclass="collapsible">
<br>
For example, <code>sortForce: [[0,0]]</code> will sort the first column in ascending order. After the forced sort, the user selected column(s), or during initialzation, the sorting order defined in the sortList will follow. And lastly, the sort defined in the <ahref="#sortappend"><code>sortAppend</code></a> option will be applied. More explicitly:<br>
<br>
There are three options to determine the sort order and this is the order of priority:
<ol>
<li><ahref="#sortforce"><code>sortForce</code></a> forces the user to have this/these column(s) sorted first (null by default).</li>
<li><ahref="#sortlist"><code>SortList</code></a> is the initial sort order of the columns.</li>
<li><ahref="#sortappend"><code>SortAppend</code></a> is the default sort that is added to the end of the users sort selection (null by default).</li>
</ol>
The value of these sort options is an array of arrays and can include one or more columns. The format is an array of instructions for per-column sorting and direction in the format: <code>[[columnIndex, sortDirection], ... ]</code> where <code>columnIndex</code> is a zero-based index for your columns left-to-right and <code>sortDirection</code> is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code>[[0,0],[1,0]]</code>.
The value contains an array of instructions for per-column sorting and direction in the format: <code>[[columnIndex, sortDirection], ... ]</code> where columnIndex is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code>[[0,0],[1,0]]</code>. Please see <ahref="#sortforce"><code>sortForce</code></a> for more details on other sort order options.<br>
<br>
This option can also be set using jQuery data (v2.3.1) or metadata on the table:
<tableclass="info">
<tfoot>
<tr><tdcolspan="2"><strong>** Note</strong>: <code>data-sortlist</code> data is not supported in jQuery versions older than 1.4.</td></tr>
<td>Use to add an additional forced sort that will be appended to the dynamic selections by the user.
<divclass="collapsible">
<br>
For example, can be used to sort people alphabetically after some other user-selected sort that results in rows with the same value like dates or money due. It can help prevent data from appearing as though it has a random secondary sort.<br>
<br>
The value contains an array of instructions for per-column sorting and direction in the format: <code>[[columnIndex, sortDirection], ... ]</code> where <code>columnIndex</code> is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code>[[0,0],[1,0]]</code>. Please see <ahref="#sortforce"><code>sortForce</code></a> for more details on other sort order options.
This sets the direction a column will sort when clicking on the header for the first time. Valid arguments are <code>"asc"</code> for Ascending or <code>"desc"</code> for Descending.<br>
Boolean flag indicating if certain accented characters within the table will be replaced with their equivalent characters. (Modified v2.2).
<divclass="collapsible">
<ul>
<li>This option no longer switches the sort to use the <code>String.localeCompare</code> method.</li>
<li>When this option is <code>true</code>, the text parsed from table cells will convert accented characters to their equivalent to allow the alphanumeric sort to properly sort.</li>
<li>If <code>false</code> (default), any accented characters are treated as their value in the standard unicode order.</li>
<li>The following characters are replaced for both upper and lower case (information obtained from <ahref="http://sugarjs.com/sorting">sugar.js sorting equivalents</a> table):
<ul>
<li><code>áàâãä</code> replaced with <code>a</code></li>
<li><code>ç</code> replaced with <code>c</code></li>
<li><code>éèêë</code> replaced with <code>e</code></li>
<li><code>íìİîï</code> replaced with <code>i</code></li>
<li><code>óòôõö</code> replaced with <code>o</code></li>
<li><code>úùûü</code> replaced with <code>u</code></li>
<li><code>ß</code> replaced with <code>S</code></li>
</ul>
</li>
<li>Please see the example page for instrcutions on how to modify the above equivalency table.</li>
<li>If you would like to continue using the <code>String.localeCompare</code> method, then set the <code>sortLocaleCompare</code> option to <code>false</code> and use the new <ahref="#textsorter"><code>textSorter</code></a> option as follows:
<spanclass="label label-info">NOTE!</span> See the <ahref="https://github.com/Mottie/tablesorter/wiki/Language">Language</a> wiki page for language specific examples and how to extend the character equivalent tables seen in the <ahref="example-locale-sort.html">sortLocaleCompare demo</a>.
<del>Boolean flag indicating whenever to use javascript <code>String.localeCompare</code> method or not.<br>
This is only used when comparing text with international character strings. A sort using localeCompare will sort accented characters the same as their unaccented counterparts.</del>
Setting this option to <code>true</code> will allow you to click on the table header a third time to reset the sort direction. (v2.0.27).
<divclass="collapsible">
<br>Don't confuse this option with the <ahref="#sortreset-method"><code>sortReset</code> method</a>. This option only resets the column sort after a third click, while the method immediately resets the entire table sort.
<td>The key used to reset sorting on the entire table. Defaults to the control key. The other options are <code>"shiftKey"</code> or <code>"altKey"</code> (<aclass="external"href="https://developer.mozilla.org/en/DOM/MouseEvent">reference</a>).</td>
Setting this option to <code>true</code> will start the sort with the <ahref="#sortinitialorder"><code>sortInitialOrder</code></a> when clicking on a previously unsorted column. (v2.0.31).
Setting this option to <code>true</code> and sorting two rows with exactly the same content, the original sort order is maintained (<spanclass="version">v2.14</span>).
This isn't exactly a <ahref="http://en.wikipedia.org/wiki/Unstable_sort#Stability">stable sort</a> because the sort order maintains the original unsorted order when sorting the column in an ascending direction. When sorting the column in a descending order, the opposite of the original unsorted order is returned. If that doesn't make any sense, please refer to <ahref="https://github.com/Mottie/tablesorter/issues/419">issue #419</a>.
<td>The key used to select more than one column for multi-column sorting. Defaults to the <kbd>Shift</kbd> key. The other options are <code>"ctrlKey"</code> or <code>"altKey"</code> (<aclass="external"href="https://developer.mozilla.org/en/DOM/MouseEvent">reference</a>).</td>
<li><code>"max"</code> will treat any text in that column as a value greater than the <em>max</em> (more positive) value. Renamed from "max+".</li>
<li><code>"min"</code> will treat any text in that column as a value greater than the <em>min</em> (more negative) value. Renamed from "max-".</li>
<li><code>"top"</code> will always sort the text to the top of the column.</li>
<li><code>"bottom"</code> will always sort the text to the bottom of the column.</li>
<li><code>"none"</code> or <code>"zero"</code> will treat the text as if it has a value of zero.</li>
<td>Additional CSS class applied to style the table - <spanclass="version updated">v2.11</span>
<divclass="collapsible"><br>
Changed to empty string in v2.11, as the <code>"tablesorter"</code> class will always be added to the table; this option now contains any additional class names to add.
<p>This class was required in the default markup in version 2.0.5. But in version 2.0.6, it was added as an option.</p>
Modify this option if you are not using the default css, or if you are using a completely custom stylesheet.
The built-in option is <code>"simple"</code> which is the equivalent of doing this inside of the textExtraction function: <code>$(node).text();</code>.
tablesorter will pass the current table cell object for you to parse and return. Thanks to Josh Nathanson for the examples. Updated to a jQuery example by Rob G (Mottie).
<p>Now if the text you are finding in the script above is say a number, then just include the <ahref="#headers"><code>headers</code></a> sorter option to specify how to sort it. Also in this example, we will specify that the special textExtraction code is only needed for the second column (<code>1</code> because we are using a zero-based index). All other columns will ignore this textExtraction function.</p>
// maxColumnValue = the maximum value of that column (ignoring its sign)
return a - b;
}
});
});</pre>The direction parameter (boolean) is merely for informational purposes as the plugin automatically switches `a` and `b` depending on the sort direction ( i.e. there's no need to worry about reverse sorting, it's taken care of by the plugin ).
Replace the default sorting algorithm with a custom one using this option (<spanclass="version updated">v2.12</span>) - <spanclass="label label-warning">*NOTE*</span> The parameters have changed!!.
3 : Array.AlphanumericSort // alphanumeric sort from sugar (http://sugarjs.com/arrays#sorting)
}
});
});</pre>The direction parameter (boolean) is merely for informational purposes as the plugin automatically switches `a` and `b` depending on the sort direction ( i.e. there's no need to worry about reverse sorting, it's taken care of by the plugin ).
Initialize widgets using this option ( e.g. <code>widgets : ['zebra']</code>, or custom widgets <code>widgets: ['zebra', 'myCustomWidget'];</code>, see <ahref="example-widgets.html">this demo</a> on how to write your own custom widget ).
In version 2.1, all widget options have been moved into this option. This is a move to store all widget specific options in one place so as not to polute the main table options. All current widgets have been modified to use this new option. (v2.1).
<divclass="collapsible">
<br>
Previously documented widget options <ahref="#widgetzebra"><code>widgetZebra</code></a>, <ahref="#widgetcolumns"><code>widgetColumns</code></a> and <ahref="#widgetuitheme"><code>widgetUitheme</code></a> will be retained for backwards compatibility.<br>
<br>
Use the <ahref="#widgetoptions"><code>widgetOptions</code></a> option as follows, please note that each option is followed by a comma (except the last one):
This option was added to set a specific page when storing data using the <ahref="#function-storage"><code>$.tablesorter.storage</code></a> code. <spanclass="version">v2.12</span>.
More specifically, when the storage function is used, it attempts to give every table a unique identifier using both the page <strong>url</strong> and table <strong>ID</strong> (or index on the page if no id exists). This option allows you to override the current page url (<em>it doesn't need to be a url, just some constant value</em>) and save data for multiple tables across a domain.<br>
<br>
The table url & id can also be overridden by setting table data attributes <code>data-table-page</code> (url) and <code>data-table-group</code> (id)<br>(e.g. <code><table class="tablesorter" data-table-page="mydomain" data-table-group="financial">...</table></code>)<br>
<br>
For a bit more detail, specifically on how to use the new storage function options for a custom widget, please refer to <ahref="https://github.com/Mottie/tablesorter/issues/389#issuecomment-26594259">issue #389</a>.
When the column styling widget is initialized, it automatically applied the default class names of <code>"primary"</code> for the primary sort, <code>"secondary"</code> for the next sort, <code>"tertiary"</code> for the next sort, and so on (add more as needed)... (v2.0.17).
Used when the ui theme styling widget is initialized. It automatically applies the default class names of <code>"ui-icon-arrowthick-2-n-s"</code> for the unsorted column, <code>"ui-icon-arrowthick-1-s"</code> for the descending sort and <code>"ui-icon-arrowthick-1-n"</code> for the ascending sort. (v2.0.9).
Find more jQuery UI class names by hovering over the Framework icons on this page: <aclass="external"href="http://jqueryui.com/themeroller/">http://jqueryui.com/themeroller/</a><br>
<br>
Use the <ahref="#widgetuitheme"><code>widgetUitheme</code></a> option to change the css class name as follows:
When the zebra striping widget is initialized, it automatically applied the default class names of <code>"even"</code> and <code>"odd"</code>.
tablesorter widgets have many options, and to better organize them, they now are grouped together inside of the <code>widgetOptions</code>. Thanks to thezoggy for putting together this jQuery-widget compatibility table, but please note:
<li>The applied order of widget is dependent of the widget priority, from low to high.</li>
<li>Widget priority values do not need to be unique. Any new widget without a defined priority will automatically have a priority of <code>10</code>.</li>
<li>* The <code>saveSort</code> and <code>resizable</code> widgets use the <ahref="#function-storage"><code>$.tablesorter.storage</code></a> function by default and thus need the <code>parseJSON</code> function which is available in jQuery 1.4.1+.</li>
<spanclass="label label-info">TIP!</span> Click on the link in the property column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
Columns widget: When the column styling widget is initialized, it automatically applied the default class names of <code>"primary"</code> for the primary sort, <code>"secondary"</code> for the next sort, <code>"tertiary"</code> for the next sort, and so on (add more as needed)... (Modified v2.1).
Columns widget: If true, the class names from the <ahref="#widget-columns"><code>columns</code></a> option will also be added to the table thead (v2.4).
Columns widget: If true, the class names from the <ahref="#widget-columns"><code>columns</code></a> option will also be added to the table tfoot (v2.4).
Filter widget: If there are child rows in the table (rows with class name from <ahref="#csschildrow"><code>"cssChildRow"</code></a> option) and this option is <code>true</code> and a match is found anywhere in the child row, then it will make that row visible.
Changed to empty string in v2.11, as the <code>"tablesorter-filter"</code> class will always be added to the filter; this option now contains any additional class names to add.
<p>Use the <ahref="#widget-filter-cssfilter"><code>"tablesorter-filter"</code></a> option to add an extra css class name as follows:</p>
Filter widget: jQuery selector string of inputs, outside of the table, to be used for searching table content (<spanclass="version">v2.15</span>).
<divclass="collapsible">
<br>
Set this option to be a jQuery selector string, or jQuery object, pointing to any external inputs that are to be used for searching the table.<br>
<br>
Use the <ahref="#widget-filter-external"><code>filter_external</code></a> option as follows:
<preclass="prettyprint lang-js">$(function(){
$("table").tablesorter({
widgets: ["filter"],
widgetOptions : {
filter_external : '.search'
}
});
});</pre>
These external inputs have one requirement, they must have a <code>data-column="#"</code>, where the <code>#</code> targets the column (zero-based index), pointing to a specific column to search.<br>
<preclass="prettyprint lang-html"><input class="search" type="search" data-column="0" placeholder="Search first column"></pre>
If you want to search all columns, using the updated "any match" method, set the data column value to "all":<br>
Filter widget: This is the class name applied to all rows that do not match the filter (hidden rows); used by pager plugin (<spanclass="version">v2.10</span>).
A new file has been included named "jquery.tablesorter.widgets-filter-formatter.js". It includes code to add jQuery UI and HTML5 controls via the <ahref="#widget-filter-formatter"><code>filter_formatter</code></a> option.<br>
<br>
Most of the formatter functions have an option named <code>valueToHeader</code> which, when <code>true</code> adds a span to the header cell above the filter row and updates it with the current control's value (see <ahref="example-widget-filter-formatter-2.html">example 2</a>). If the option exists and is set to <code>false</code>, then the current value is added to the control's handle and css can be used to create a popup to show the current value (see <ahref="example-widget-filter-formatter-1.html">example 1</a>).<br>
<br>
Another custom option named <code>addToggle</code> is included with the "uiSpinner", "html5Color" and "html5Number" code. This allows the user to disable the control to show all table rows. For the single sliders, "uiSlider" and "html5Range", the minimum value is used to clear the filter (show all rows).<br>
<br>
The options included for each jQuery UI control only show basic options, but any or all of the jQuery UI options for that control can be included.<br>
For other examples, please refer to the example pages. Formatter part 1 (example 1) adds jQuery UI controls to the filter row, while formatter part 2 (example 2) adds HTML5 controls, if supported, to the filter row.
// set the column value to true, and/or add "filter-select" class name to header
0 : true
}
}
});
});</pre>
Alternately, instead of setting the column filter funtion to true, give the column header a class name of "filter-select". See the <ahref="example-widget-filter-custom.html">demo</a>.<br><br>
</li>
<li>
Make a select dropdown list with custom option settings. Each option must have a corresponding function which returns a boolean value; return true if there is a match, or false with no match.
Filter widget: Set this option to <code>false</code> to always show the filter row; by default, the filter row is completely hidden when no rows exist within the tbody (<spanclass="version">v2.15</span>).
<divclass="collapsible">
<br>
Use the <ahref="#widget-filter-hideempty"><code>filter_hideEmpty</code></a> option as follows:
Filter widget: Set this option to <code>true</code> to hide the filter row initially. The row is revealed by hovering over the visible portion of the filter row or by giving any filter input/select focus (tab key) (v2.4).
});</pre>You can change the style (thickness) of the hidden filter row in the tablesorter theme css. Look for <code>.tablesorter-filter-row</code> (revealed row) and <code>.tablesorter-filter-row.hideme</code> (for the hidden row) css definitions.</div>
Filter widget: Set this option to <code>false</code> to make the column content search case-insensitive, so typing in "a" will not find "Albert". (v2.3.4)
Filter widget: If <code>true</code>, a search of the column content will occur as the user types, with the delay set in the <code>filter_searchDelay</code> option (v2.9; <spanclass="version updated">v2.10</span>).
This option, when <code>false</code> allows you to disable the live search behavior, so that a filter is only applied when the user presses <kbd>Enter</kbd> (or uses <kbd>Esc</kbd> to clear and cancel the search).<br>
If this option is set to a number, e.g. <code>4</code>, a search of the column content will not initiate until this minimum number of characters are entered into the input.
Filter widget: If a header contains a select dropdown and this class name, only the available (visible) options in the column will show (<spanclass="version">v2.10.1</span>).
This option is useful after one or more columns have been filtered, then the column select filter with this class applied will only show the contents of the column within the dropdown that are currently visible. See the <ahref="example-widget-filter-custom.html">custom filter widget</a> demo "Discount" column for an example (sort the "First Name" column first).<br>
<spanclass="label label-warning">Caution:</span> The main issue with this functionality is with keyboard accessibility. If the keyboard is used to select an option, only the first and default options will be available for chosing. The only way to select other options is with the mouse.
To use this option, point to a reset button or link using a jQuery selector. For example, add this button (<code><button class="reset">Reset</button></code>) to the table header, or anywhere else on the page. That element will be used as a reset for all column and quick search filters (clears all fields):
</p>
Use the <ahref="#widget-filter-reset"><code>filter_reset</code></a> option as follows:
Filter widget: If the storage utility is available (included with <code>jquery.tablesorter.widgets.js</code> file, the last applied filter is saved to storage (<spanclass="version">v2.14</span>).
Filters saved to local storage (or cookies) will over-ride any default filters within the header data-attribute (set by the <ahref="#widget-filter-defaultattrib"><code>filter_defaultAttrib</code> option</a> and be available to the pager before any ajax calls are made.<br>
<br>
To bypass this behavior, clear out the saved filters as follows:
Filter widget: Set this option to <code>true</code> to use the filter to find text from the start of the column, so typing in "a" will find "albert" but not "frank", both have a's. (v2.1).
<li>To only use parsed data in specific columns, set this option to <code>false</code> and use any of the following (they all do the same thing), set in order of priority:
<li>Remember that parsed data most likely doesn't match the actual table cell text, <code>20%</code> becomes <code>20</code> and <code>Jan 1, 2013 12:01 AM</code> becomes <code>1357020060000</code>.</li>
Filter widget: This option contains the name of the data-attribute which contains the default (starting) filter value (<spanclass="version">v2.10.8</span>).
<divclass="collapsible">
<br>
Use the <ahref="#widget-filter-defaultattrib"><code>filter_defaultAttrib</code></a> option as follows:
});</pre>Then add the default filter value to the table header as follows:<preclass="prettyprint lang-html"><th data-value="<30">Age</th></pre></div>
<td>Sticky Headers widget: This additional CSS class applied to the sticky header row - <spanclass="version updated">v2.11</span>
<divclass="collapsible"><br>
Changed to empty string in v2.11, as the <code>"tablesorter-stickyHeader"</code> class will always be added to the sticky header row; this option now contains any additional class names to add.
<p>Previously, this option contained the class name to be applied to the sticky header row (tr) (v2.1).<p>
Use the <ahref="#widget-sticky-headers"><code>"stickyHeaders"</code></a> option to add an extra css class name as follows:
Sticky Headers widget: If the table has an ID defined, the suffix from this option will be added to the ID in the cloned sticky table (<spanclass="version">v2.9</span>).
Sticky Headers widget: If this option is <code>false</code> and a caption exists, it will not be included in the sticky header (<spanclass="version">v2.10.8</span>).
<divclass="collapsible">
<br>
Use the <ahref="#widget-sticky-headers-include-caption"><code>stickyHeaders_includeCaption</code></a> option as follows:
Sticky Headers widget: points to the table wrapper to stick the headers to while scrolling. Use this option to point to their needs (<spanclass="version">v2.14.4</span>).
<divclass="collapsible">
<br>
Use the <ahref="#widget-sticky-headers-attachto"><code>stickyHeaders_attachTo</code></a> option as follows:<br>
Sticky Headers widget: Set the sticky header offset from the top as a <em>Number</em> or jQuery selector <em>string</em> or <em>object</em> (<spanclass="version">v2.10</span>).
If the page includes a fixed navigation bar at the top, like Bootstrap, set <ahref="#widget-sticky-headers-offset"><code>"stickyHeaders_offset"</code></a> option to offset the sticky table header to be below the fixed navigation by setting this option using any of the following examples:<br>
Sticky Headers widget: If <code>true</code>, sticky table headers will resize automatically when content is added to or removed from the table headers (<spanclass="version">v2.10</span>).
<divclass="collapsible">
<br>
While this option is <code>true</code>, a timer is initialized to check the width of every header cell every 1/4 second. If this causes lag, or any other problems, set this option to <code>false</code>.
When this option is <code>false</code>, sticky table headers are unable to detect and match the width of the original table headers when content is added or removed.<br>
Sticky Headers widget: The zIndex added to the stickyHeaders. This option allows the user to adjust the value to their needs (<spanclass="version">v2.11</span>).
<divclass="collapsible">
<br>
Use the <ahref="#widget-sticky-headers-zindex"><code>stickyHeaders_zIndex</code></a> option as follows:
Resizable widget: If this option is set to <code>false</code>, resized column widths will not be saved. Previous saved values will be restored on page reload (v2.4).
Resizable widget: If this option is set to <code>true</code>, a resizing anchor will be included in the last column of the table (<spanclass="version">v2.8.3</span>).
If an anchor was included and the table is full width, the column would resize in the opposite direction which my not be intuitive to the user. So set this option as desired, but please be mindful of the user experience.<br>
Use the <ahref="#widget-resizable-addlastcolumn"><code>"resizable_addLastColumn"</code></a> option to include the last column resizer as follows:
saveSort widget: If this option is set to <code>false</code>, new sorts will not be saved. Any previous saved sort will be restored on page reload (v2.4).
This option contains the name of the theme. Currently jQuery UI ("jui") and Bootstrap ("bootstrap") themes are supported (updated v2.4)
This widget option replaces the previous <ahref="#widgetuitheme">widgetUitheme</a>. All theme css names are now contained within the <code>$.tablesorter.themes</code> variable. Extend the default theme as seen above.<br>
<br>
The class names from the <code>$.tablesorter.themes.{name}</code> variable are applied to the table as indicated.<br>
As before the jQuery UI theme applies the default class names of <code>"ui-icon-arrowthick-2-n-s"</code> for the unsorted column, <code>"ui-icon-arrowthick-1-s"</code> for the descending sort and <code>"ui-icon-arrowthick-1-n"</code> for the ascending sort. (Modified v2.1; Updated in v2.4). Find more jQuery UI class names by hovering over the Framework icons on this page: <aclass="external"href="http://jqueryui.com/themeroller/">http://jqueryui.com/themeroller/</a><br>
zebra widget: When the zebra striping widget is initialized, it automatically applied the default class names of <code>"even"</code> and <code>"odd"</code>. (Modified v2.1).
Target your one or more pager markup blocks by setting this option with a jQuery selector.
<divclass="collapsible">
<br>
This is some example pager markup. It <em>should</em> contain all of the controls set by the multiple css-named options:<preclass="prettyprint lang-html">
Set this option to include a url template to use so that the pager plugin can interact with your database (Added v2.1; <spanclass="version updated">v2.9</span>).
<tr><td><code>{page+1}</code></td><td>One-based index of the current pager page (replace "+1" with any number) (e.g. <code>{page+3}</code>) (<spanclass="version">v2.9</span>).</td></tr>
The <code>col</code> portion of the <code>{sortList:col}</code> tag can be any name string (no spaces) to indicate the name of the variable to apply. So if your current sortList is <code>[[2,0],[3,0]]</code>, it becomes <code>"&sort[2]=0&sort[3]=0"</code> in the url. <code>{sort:col}</code> shortened tag also works (<spanclass="version">v2.9</span>).
<td>Adds the value of the current filters to the ajax url string into a "fcol" array, so your server-side code knows how to filter the data (v2.6).<br>
The <code>fcol</code> portion of the <code>{filterList:fcol}</code> tag can be any name string (no spaces) to indicate the name of the variable to apply. So if your current filters are <code>['','Blue',13]</code>, it becomes <code>"&fcol[2]=Blue&fcol[3]=13"</code> in the url. <code>{filter:col}</code> shortened tag also works (<spanclass="version updated">v2.9</span>).
The <code>customAjaxUrl</code> function has two parameters, the table DOM element and the processed url string (all tags within the <code>ajaxUrl</code> have been replaced with their appropriate values).
This option contains the ajax settings for the pager interaction with your database (<spanclass="version">v2.10</span>).
<divclass="collapsible">
<br>
The <code>ajaxObject</code> is completely customizable, except for the `url` setting which is processed using the pager's `ajaxUrl` and `customAjaxUrl` options.<br>
<br>
See all possible settings in the <ahref="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">jQuery.ajax documentation</a>
Set this option to <code>false</code> if your table data is preloaded into the table, but you are still using ajax (<spanclass="version">v2.14.5</span>).
This function is required to return the ajax data obtained from your server into a useable format for tablesorter to apply to the table (v2.1, <spanclass="version updated">v2.14.3</span>).
In <spanclass="version">v2.10</span>, the returned rows is now optional. And it can either be an array of arrays or a jQuery object (not attached to the table)
]</pre><spanclass="label label-info">Note</span>: In <spanclass="version">v2.14.3</span>, the contents of the array can also contain table cell markup (i.e. <code>"<td class='green'>+ 10%</td>"</code>).<br>
<br>Here is some example JSON (comments added, but not allowed in JSON) which is contained in the <ahref="https://github.com/Mottie/tablesorter/blob/master/docs/assets/City0.json">City0.json</a> file:
<td>This option allows you to format the output display which can show the current page, total pages, filtered pages, current start and end rows, total rows and filtered rows (v2.0.9).<divclass="collapsible">
<br>
This option replaced the original <code>separator</code> option, which only separated the page number from the total number of pages. The formatted output from this option is placed inside the information block targeted by the <code>cssPageDisplay</code> option.<br>
<td>Set initial number of visible rows. This value is changed by the dropdown selector targeted by the <ahref="#pager-csspagesize"><code>cssPageSize</code></a> option.</td>
<td>Saves the current pager page size and number. This option requires the <ahref="#function-storage"><code>$.tablesorter.storage</code></a> script in the <code>jquery.tablesorter.widgets.js</code> file (<spanclass="version">v2.11</span>).</td>
<td>Saves tablesorter paging to custom key if defined. Key parameter name used by the <ahref="#function-storage"><code>$.tablesorter.storage</code></a> function. Useful if you have multiple tables defined (<spanclass="version">v2.15</span>)</td>
<td>Maintain the height of the table even when fewer than the set number of records is shown (v2.1; updated 2.7.1).
<divclass="collapsible">
<br>
This option replaced the original <code>positionFixed</code> and <code>offset</code> options which set the absolute position of the pager block.<br>
<br>
If <code>true</code>, it should maintain the height of the table, even when viewing fewer than the set number of records (go to the last page of any demo to see this in action). It works by adding an empty row to make up the differences in height.
<spanclass="label label-warning">*CAUTION*</span> When <code>true</code>, child row(s) may not appear to be attached to its parent row, may be split across pages or
If <code>true</code>, rows are removed from the table to speed up the sort of large tables (v2.0.21).
<divclass="collapsible">
<br>
The original tablesorter plugin (v2.0.5) removed rows automatically, without providing an option. It really does speed up sorting of very large tables, but also breaks updating and modifying table content dynamically.<br>
<br>
If this option is <code>false</code>, the addon only hides the non-visible rows; this is useful if you plan to add/remove rows with the pager enabled.
<td>This option contains a jQuery selector string pointing to the go to first page arrow. See <ahref="#pager-container"><code>container</code></a> for full HTML.</td>
<td>This option contains a jQuery selector string pointing to the go to previous page arrow. See <ahref="#pager-container"><code>container</code></a> for full HTML.</td>
<td>This option contains a jQuery selector string pointing to the go to next page arrow. See <ahref="#pager-container"><code>container</code></a> for full HTML.</td>
<td>This option contains a jQuery selector string pointing to the go to last page arrow. See <ahref="#pager-container"><code>container</code></a> for full HTML.</td>
<td>This option contains a jQuery selector string pointing to the page select dropdown. See <ahref="#pager-container"><code>container</code></a> for full HTML (v2.4)
Please note that this select dropdown is initially empty and automatically updated by the plugin with the correct number of pages, which depends on the <ahref="#pager-size"><code>size</code></a> setting.
<td>This option contains a jQuery selector string pointing to the output element (v2.0.9)
<divclass="collapsible">
<br>
In the original tablesorter (v2.0.5) this option could only target an input, it was updated (v2.0.9) to display the formatted output from the <code>output</code> option inside of any element (span, div or input).
<td>This option contains a jQuery selector string pointing to the page size selector. See <ahref="#pager-container"><code>container</code></a> for full HTML.</td>
More explicitly, this class is applied to the pager arrows when they are at either extreme of pages and the <code>updateArrows</code> option is <code>true</code>. When the pager has been disabled, this class is applied to all controls.<br>
Filter widget: This option was <spanclass="label label-danger">removed</span> in <spanclass="version updated">v2.15</span>... sorry for the sudden notice.
<divclass="collapsible">
<br>
This option has been replaced by the <ahref="#widget-filter-external"><code>filter_external</code></a> option.<br>
<br>
Show any rows that match a search query. If this option is <code>true</code> any column match will show that row; but there are limitations (<spanclass="version">v2.13.3</span>).<br>
<br>
It is best if this <ahref="#widget-filter-anymatch"><code>filter_anyMatch</code></a> option is used with a single search input as follows:
The original tablesorter pager plugin absolutely positioned the pager controls at the bottom of the table. It appears that this option was intended to tweak the position of the pager container. The option exists, but no code was found.</div>
This pager plugin option has been <spanclass="label label-danger">removed</span>! Use the <ahref="#pager-output">output</a> option to allow for more control over the formatting.
The original tablesorter pager plugin would combine the current page with the calculated total number of pages within the <ahref="#pager-csspagedisplay">cssPageDisplay</a> with this separator string inbetween.</div>
<spanclass="label label-info">TIP!</span> Click on the link in the method column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
It does not work the same as "update" in that it only adds rows, it does not remove them.<br>
Also, use this method to add table rows while using the pager plugin. If the "update" method is used, only the visible table rows continue to exist.
$('table').find('th:eq(2)').trigger('sort');</pre>Using this method will maintain the sorting order; so, if the column is already sorted in ascending order, this method will act as if you manually clicked on the header. Whatever sort order is applied is dependent on other option settings such as <code>initialSortOrder</code>, <code>lockedOrder</code> (set within the <code>headers</code>), <code>sortReset</code> option, <code>sortRestart</code> and will be ignored if the column sort is disabled (<code>sorter: false</code>).<br>
<spanclass="label label-warning">*NOTE*</span> using this method to sort ignores the additions from the <ahref="#sortforce"><code>sortForce</code></a> and <ahref="#sortappend"><code>sortAppend</code></a> options.
<spanclass="label label-info">NOTE</span> Don't confuse this method with the <ahref="#sortreset"><code>sortReset</code> option</a>. <code>updateRows</code> was added to work around the issue of using jQuery with the Prototype library. Triggering an "update" would make Prototype clear the tbody; Please see <ahref="https://github.com/Mottie/tablesorter/issues/217">issue #217</a> for more details.
<td>Adds all of the cached table rows back into the table.<br>
<divclass="collapsible"><br>
This method was originally designed to be used with the pager. It should be used under these conditions:
<ul>
<li>When the pager <code>removeRows</code> option is <code>true</code>.</li>
<li>When not using the "updateCell" or "addRows" methods.</li>
<li>Before manually adding or removing table rows.</li>
<li>And, before triggering an "update".</li>
</ul>
Note: The entire table is stored in the cache, but when using the pager with the <ahref="#pager-removerows"><code>removeRows</code> option</a> set to <code>true</code>, only the visible portion is actually exists within the table. So, use this option to add all stored rows back into the table before manually changing the contents. Otherwise, if any update method is triggered, only the visible rows will be added back to the cache.
<preclass="prettyprint lang-js">// how to update the table contents
<td>Apply the selected widget to the table, but the widget will not continue to be applied after each sort. See the example, it's easier than describing it.
<td>Apply the set widgets to the table. This method can be used after a table has been initialized, but it won't work unless you update the configuration settings. See the example, it's easier than describing it.
<td>Refresh the currently applied widgets. Depending on the options, it will completely remove all widgets, then re-initialize the current widgets or just remove all non-current widgets (v2.4).
<li>If <code>doAll</code> is <code>true</code> it removes all widgets from the table. If <code>false</code> only non-current widgets (from the <code>widgets</code> option) are removed.</li>
<li>When done removing widgets, the widget re-initializes the currently selected widgets, unless the <code>dontapply</code> parameter is <code>true</code> leaving the table widget-less.</li>
<li>Note that if the <code>widgets</code> option has any named widgets, they will be re-applied to the table when it gets resorted. So if you want to completely remove all widgets from the table, also clear out the widgets option <code>$('table')[0].config.widgets = [];</code></li>
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 label-warning">Warning!</span> please note that if no external input (with a <code>data-column="all"</code> is attached using <ahref="#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>
If you are using the <code>filter_formatter</code> option to add custom input elements, this function may not work on those columns. Please refer to the <code>filter_formatter</code> section for more details.
<spanclass="label label-info">TIP!</span> Click on the link in the event column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
You can use this event to modify the filter elements (row, inputs and/or selects) as desired. Use it as follows:<preclass="prettyprint lang-js">$(function(){
You can use this event to do something like remove the class added to the filter row when the filtering started. Use it as follows:<preclass="prettyprint lang-js">$(function(){
This event may fire before the <code>pagerComplete</code> event when ajax processing is involved, or after the <code>pagerComplete</code> on normal use.
See <ahref="https://github.com/Mottie/tablesorter/pull/153">issue #153</a>.
tablesorter has some useful internal variables & functions available through the API which can be used in custom coding, parsers and/or widgets.<br>
<h4>Variables</h4>
<spanclass="label label-info">TIP!</span> Click on the link in the variable column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
<td>This is an object containing a list of specific class names to be applied to table elements. Please see the widget <ahref="#widget-uitheme"><code>uitheme</code></a> option for more details. </td>
<td>Internal list of table contents (added <spanclass="version">v2.0.18</span>)
<divclass="collapsible">
<br>
This object contains the following:<br>
<ul>
<li>tbody index
<ul>
<li><code>colMax</code>
<ul>
<li>This contains an array of the maximum numerical value for each "numerically" parsed column.</li>
<li>Text columns will not have a defined value in this array.</li>
<li>Used when determining how to sort text within a numeric column.</li>
</ul>
</li>
<li><code>normalized</code>
<ul>
<li>This contains an array of indexed table rows.</li>
<li>Within each row is an array of extracted, then parsed table contents for each column (plus one extra value; see the next comment).</li>
<li>It is important to note that the last value in the column array is actually the original row index value. This is used when resetting a column sort to its original unsorted order.</li>
<li>Note that all text values will be in lower case if the <ahref="#ignorecase"><code>ignoreCase</code></a> option is <code>true</code>.</li>
<li>This internal normalized content is what is actually sorted for maximum performance.</li>
</ul>
</li>
<li><code>row</code>
<ul>
<li>This contains an array of jQuery row objects.</li>
<li>These rows are never in sort order, and are used when updating the table after sorting the normalized content. The indexing of these rows is cross-referenced within the normalized values - the extra column value within the row array. Hopefully that makes sense.</li>
</ul>
</li>
</ul>
</li>
<li>In version 3, I plan to:
<ul>
<li>Make the "one extra value" within the normalized row array to be an object.</li>
<li>Within this object will be the original row index, and a jQuery object of that row. Therefore removing the actual <code>row</code> section from the cache.</li>
<li>I have an array of normalized column content also stored in the cache to optimize the filter widget, but this may change in time.</li>
</ul>
</li>
</ul>
The <code>table.config.cache</code> variable is useful when writing widgets that need access to the parsed content.
<td>Internal count of the number of table columns in the header (added <spanclass="version">v2.12</span>)
<divclass="collapsible">
<br>
This number is stored as a length (one-based), and takes into account any <code>colspan</code> and <code>rowspan</code> within the table head.<br>
<br>
Note that the <code>table.config.columns</code> variable does not always correlate with the indexing of the headers stored within <ahref="#variable-headers"><code>table.config.$headers</code></a> because of multiple rows and column or row spans.
<td>Internal list of each header's starting HTML (as text)
<divclass="collapsible"><br>
This HTML snapshot is taken using the <ahref="#variable-headers"><code>$headers</code></a> jQuery object, and done before the <ahref="#headertemplate"><code>headerTemplate</code></a> is applied and before the <ahref="#onrendertemplate"><code>onRenderTemplate</code></a> and <ahref="#onrenderheader"><code>onRenderHeader</code></a> callbacks are executed.<br>
<br>
This list is used by the <code>$.tablesorter.restoreHeaders</code> function to restore the table headers when the <ahref="#destroy"><code>destroy</code></a> method is executed.
<td>Internal list of each header element as selected using jQuery selectors in the <ahref="#selectorheaders"><code>selectorHeaders</code></a> option.
<divclass="collapsible">
<br>
This list contains DOM elements (not jQuery objects of each table header cell like the <ahref="#variable-headers"><code>$headers</code></a> variable) and is how the original version of tablesorter stored these objects.
<br>
It is not used in the current version of tablesorter, and is only left in place for backwards compatibility with widgets written for the original tablesorter plugin.
<td>Internal list of all of the table's currently set parsers (objects copied from <ahref="#variable-parsers"><code>$.tablesorter.parsers</code></a>). Here is a complete list of default parsers:
<divclass="collapsible">
<br>
<tableclass="info"><tbody>
<tr><th><code>sorter: false</code></th><td>disable sort for this column.</td></tr>
<tr><th><code>sorter: "currency"</code></th><td>Sort by currency value (supports "£$€¤¥¢").</td></tr>
<tr><th><code>sorter: "ipAddress"</code></th><td>Sort by IP Address.</td></tr>
<tr><th><code>sorter: "url"</code></th><td>Sort by url.</td></tr>
<tr><th><code>sorter: "isoDate"</code></th><td>Sort by ISO date (YYYY-MM-DD or YYYY/MM/DD; these formats can be followed by a time).</td></tr>
<tr><th><code>sorter: "percent"</code></th><td>Sort by percent.</td></tr>
<tr><th><code>sorter: "usLongDate"</code></th><td>Sort by date (U.S. Standard, e.g. Jan 18, 2001 9:12 AM or 18 Jan 2001 9:12 AM (new in v2.7.4)).</td></tr>
<tr><th><code>sorter: "shortDate"</code></th><td>Sort by a shortened date (see <ahref="#dateformat"><code>dateFormat</code></a>; these formats can also be followed by a time).</td></tr>
<tr><th><code>sorter: "time"</code></th><td>Sort by time (23:59 or 12:59 pm).</td></tr>
<tr><th><code>sorter: "metadata"</code></th><td>Sort by the sorter value in the metadata - requires the metadata plugin.</td></tr>
</tbody></table><br>
Check out the <ahref="#headers"><code>headers</code></a> option to see how to use these parsers in your table (example #1).<br>Or add a header class name using "sorter-" plus the parser name (example #2), this includes custom parsers (example #3).
<td>Internal list of <strong>all</strong> table header cells (added <spanclass="version">v2.8</span>)
<divclass="collapsible">
<br>
The header cells are targeted using the jQuery selector from the <ahref="#selectorheaders"><code>selectorHeaders</code></a> option.<br>
<br>
Please note that the headers cells are simply an array of all header cells and should not be targeted using a column index. For example, given the following table <code>thead</code> markup, the <code>header-index</code> counts the header <code>th</code> cells and does not actually match the <code>data-column</code> index when extra rows and/or <code>colspan</code> or <code>rowspan</code> are included in any of the header cells:
So, in the above example, to target the header cell in the second table column (<code>data-column</code> index of 1), use the following code: <code>table.config.$headers.filter('[data-column="1"]')</code> or <code>table.config.$headers.eq(2)</code>.<br>
<br>
The <code>table.config.$headers</code> variable is useful within callback functions or when writing widgets that target the table header cells.
<td>Boolean value indicating that tablesorter has been initialized on a table
<divclass="collapsible">
<br>
This variable is not stored within the config, as the config would not be defined (an alternative method of determining if tablesorter has been initialized).<br>
<br>
Access it as follows: <code>$('table')[0].hasInitialized</code>. It is <code>true</code> while tablesorter is active on a table, and <code>false</code> if tablesorter was destroyed.
<td>Only available when the filter widget is active. This variable contains all external search inputs with <code>data-column="all"</code>, bound using the <ahref="#function-bind-search"><code>bindSearch</code></a> function.
<divclass="collapsible">
<br>
The <code>table.config.widgetOptions.filter_$anyMatch</code> variable contains one more more search inputs, and is dynamically updated if the <ahref="#function-bind-search"><code>bindSearch</code></a> function is called; make sure to set the flag to force a new search so that the values of the altered filters is updated appropriately.
<td>Only available when the filter widget is active. This variable contains all table cells within the filter row.
<divclass="collapsible">
<br>
Use the <code>table.config.$filters</code> variable when access to filters is needed. Note! This variable contains the <strong>table cell</strong> and not the actual input because the <ahref="#widget-filter-formatter"><code>filter_formatter</code></a> function allows adding other types of value selectors (e.g. jQuery UI slider).
<td>Only available when the filter widget is active. This variable contains all external search inputs bound using the <ahref="#function-bind-search"><code>bindSearch</code></a> function.
<divclass="collapsible">
<br>
The <code>table.config.widgetOptions.filter_$externalFilters</code> variable contains an array of jQuery objects pointing to all external inputs, even if the <ahref="#function-bind-search"><code>bindSearch</code></a> function is used multiple times.
<td>Only available when the filter widget is active. This variable contains all external search inputs bound using the <ahref="#function-bind-search"><code>bindSearch</code></a> function.
<divclass="collapsible">
<br>
The <code>table.config.widgetOptions.filter_$externalFilters</code> variable contains an array of jQuery objects pointing to all external inputs, even if the <ahref="#function-bind-search"><code>bindSearch</code></a> function is used multiple times.
<td>Only available when the stickyHeaders widget (not the css3 version) is active.
<divclass="collapsible">
<br>
The <code>table.config.widgetOptions.$sticky</code> variable contains a jQuery object pointing to a cloned table containing the sticky header. The table contained within this variable has a class name of <code>"containsStickyHeaders"</code> versus the original table with a class name of <code>"hasStickyHeaders"</code>.
</div>
</td>
<td></td>
</tr>
</table>
<divclass="tip">
<h4>Functions</h4>
<spanclass="label label-info">TIP!</span> Click on the link in the function column to reveal full details (or <ahref="#"class="toggleAll">toggle</a>|<ahref="#"class="showAll">show</a>|<ahref="#"class="hideAll">hide</a> all) or double click to update the browser location.
<li><code>getIt</code> - Boolean flag (optional if <code>false</code>).</li>
</ul>
When calling the function, to get a tbody, set the <code>getIt</code> boolean parameter to <code>true</code> and the removed tbody is returned; setting this option to <code>false</code> or optionally not including it will restore the tbody.
<br>
Here is a basic example of how this function is used:
Please note that completely detaching the tbody was found to be a much quicker method of manipulating DOM elements than just hiding the tbody; this is especially true in older browsers.
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
<li><code>toggle</code> - Boolean flag.</li>
<li><code>$ths</code> - jQuery object of targetted header cells (optional; if excluded all header cells are targetted).</li>
</ul>
When calling the function, set the <code>toggle</code> option to add (<code>true</code>) or remove (<code>false</code>) process indicators. Include any specific header cells within the <code>$ths</code> variable with which to add the process indicator. When <code>$ths</code> is not defined and a sort is applied, the currently sorted header cells will show process indicators.<br>
<br>
All this function does is add or remove a class name of <code>"tablesorter-processing"</code> and the class name contained within the <ahref="#cssprocessing"><code>cssProcessing</code> option</a>.<br>
<br>
Here is a basic example of how this function is used:
Please note that currently the processing icons do not animate (see <ahref="https://github.com/Mottie/tablesorter/issues/158">issue #158</a>). This is due to javascript being a single-threaded, meaning it only does one task at a time, and maximizing the sorting script. So lots of processing is needed to sort & rebuild the table and thus it has no time for animation. If someone knows of a better solution, please share!
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
</ul>
Please note that this function uses jQuery <code>empty()</code>. All data & event handlers are removed. No where within the tablesorter script or included widgets is this function used, it is left intact for backwards compatibility.
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
<li><code>$headers</code> - jQuery object of targetted cells.</li>
</ul>
This function allows you to bind the same header event listeners to external headers cells (usually clones of the original table). This includes the triggered <code>sort</code> event, left click (only) to sort, ignoring long clicks (> 250ms), pressing enter to trigger a sort (must have focus and a <code>tabindex</code> attribute) and cancelling selection of text (if the option is set).<br>
<br>
To ensure the columns match the original table, include <code>data-column</code> attributes pointing to the desired column.<br>
<br>
Here is a basic example of how this function is used:
<td>This function restores the table headers cells with their original content.
<divclass="collapsible"><br>
The original header cell content is saved, within the <ahref="#variable-headercontent"><code>headerContent</code></a> variable array, before the <ahref="#headertemplate"><code>headerTemplate</code></a> is applied and before the <ahref="#onrendertemplate"><code>onRenderTemplate</code></a> and <ahref="#onrenderheader"><code>onRenderHeader</code></a> callbacks are executed.<br>
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
</ul>
Please note that only header cells that still contain a div with a class name of <code>tablesorter-header-inner</code> will have their contents restored; it assumes that the contents have already been restored.
</div>
</td>
</tr>
<trid="function-destroy">
<td><ahref="#"class="permalink">destroy</a></td>
<td>This function completely removes tablesorter, including all widgets, associated data & event handlers from the table.
<li><code>callback</code> - Function executed once tablesorter has been removed.</li>
</ul>
When calling the function, set the <code>removeClasses</code> option to <code>true</code> to include removing of the <code>"tablesorter"</code> class name, tablesorter theme name (e.g. <code>"tablesorter-blue"</code>) and the class name applied by the <ahref="#tableclass"><code>tableClass</code> option</a>. The callback function only provides a <code>table</code> (DOM element only) parameter.<br>
<br>
Here is a basic example of how this function is used:
alert('tablesorter has been removed! No sort for you!');
});</pre>
Please note that only header cells that still contain a div with a class name of <code>tablesorter-header-inner</code> will have their contents restored; it assumes that the contents have already been restored.
This function is used when the <ahref="#sortlocalecompare">sortLocaleCompare</code></a> option is set to <code>true</code>. Please refer to the option and <ahref="example-locale-sort.html">the demo</a> for more details on the defaults values and how to add more accented characters.
<td>This function returns a zero-based index value of the position of the value within the array, otherwise it returns -1 (Modified <spanclass="version updated">v2.15.6</span>).
<li><code>value</code> - value to find within the array.</li>
<li><code>array</code> - array (sortList) to search for the value.</li>
</ul>
Sadly, this function has limited usefulness outside of tablesorter. It is only meant to search a <code>sortList</code> array and determine if a column (value) is already contained within it. Here is a basic example of how this function is used:
After <spanclass="version">v2.15.6</span>, this function returns a zero-based index of the position of the value within the array parameter, or -1 if the value is not in the array. Previously, this function returned a boolean value of <code>true</code> if the value was contained within the array, or <code>false</code> if not.
The <code>myParser</code> object must contain a proper template. The template must include an <code>id</code>, <code>is</code>, <code>format</code> and <code>type</code> blocks. Please refer to the <ahref="example-parsers.html">writing custom parsers</a> demo page for more details & an example.
The <code>myWidget</code> object must contain a proper template. The template must include an <code>id</code> and <code>format</code> blocks. The <code>priority</code>, <code>options</code>, <code>init</code> and <code>remove</code> blocks are optional. Please refer to the <ahref="example-widgets.html">writing custom widgets</a> demo page for more details & an example.
The <code>init</code> flag is only set to <code>true</code> to extend the default option values from the widget options block. If the widget(s) have already been applied to the table, just leave this parameter undefined.<br>
<br>
This function is called when the <ahref="#applywidgets">applyWidgets</a> method is triggered.
The <code>doAll</code> flag is set to <code>true</code> if all widgets contained with the global <ahref="#variable-widgets">$.tablesorter.widgets</code></a> array are to be removed.<br>
<br>
This function is called when the <ahref="#refreshwidgets">refreshWidgets</a> method is triggered.
</div>
</td>
</tr>
<trid="function-getdata">
<td><ahref="#"class="permalink">getData</a></td>
<td>This functions gets the sorter, string, empty, etc options for each column from jQuery data, metadata, header option or header class name ("sorter-false").
<divclass="collapsible"><br>
priority = jQuery data > meta > headers option > header class name<br>
<li><code>headerCell</code> - table DOM element (or jQuery object) of targetted header cell.</li>
<li><code>configHeaders</code> - table.config.headers option for the current column.</li>
<li><code>key</code> - get value for this option name, e.g. "sorter".</li>
</ul>
If the value of the "sorter" option is needed for a column, set the <code>key</code> to "sorter" and this function will return the set value, e.g. <code>false</code>, <code>digit</code>, <code>currency</code> etc.<br>
<li><code>string</code> - a string possibly containing a number.</li>
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
</ul>
If <code>string</code> is empty, not a string type, or not a number (after processing), the string itself is returned.<br>
<br>
This function uses the <ahref="#usnumberformat"><code>usNumberFormat</code></a> option to determine if either commas or decimals are removed before converting the value within the <code>string</code> parameter into a number type variable. This function does not use the <ahref="#function-isdigit"><code>$.tablesorter.isDigit</code></a> function.<br>
<br>
Any numbers wrapped within parenthesis are converted into negative numbers; but any other symbols (e.g. currency) are not removed and will cause this function to determine the string as a non-number (e.g. "$1.25" will be returned as a string).<br>
<br>
Use this function as follows:
<preclass="prettyprint lang-js">// result: -2345.67 if usNumberFormat option is true
<li><code>string</code> - a string possibly containing a number.</li>
</ul>
This function will return a boolean value of <code>true</code> if the <code>string</code> parameter contains a number after all commas, decimals, quotes and spaces are removed, and still allow plus or minus signs, or the number wrapped in parenthesis (negative values).<br>
<br>
Use this function as follows:
<preclass="prettyprint lang-js">// boolean value of true returned
<td>This function allows adding/removing a row to the thead, to display any errors <spanclass="version">v2.15</span>
<divclass="collapsible"><br>
This function is ONLY included within the <code>widget-pager.js</code> and <code>jquery.tablesorter.pager.js</code> files; in version 3+, I plan to add it as a selectable option in a build.<br>
<li><code>table</code> - table DOM element (or jQuery object) of table (or tables).</li>
<li><code>message</code> - a plain string, or string of an HTML row.</li>
</ul>
This function will add a table row to the thead, with a class name from either the pager plugin <code>cssErrorRow</code> option setting, or the pager widget <code>pager_css.errorRow</code> option (the default class name is `"tablesorter-errorRow"`; and styled within each theme css file).<br>
<br>
When passing this function a message, there are three possibilities:
<ol>
<li>Plain string - <code>"table refuses to cooperate"</code></li>
<li>HTML row string - <code>'<tr><td colspan="' + table.config.columns + '">yeah, instead of showing your data... I am taking a nap</td></tr>'</code> (the <ahref="#variable-columns"><code>table.config.columns</code> variable</a> contains the number of table columns; use as needed)</li>
<li>undefined - completely leave out a message parameter <code>$.tablesorter.showError( table );</code> to remove all error rows from the table thead.</li>
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
<li><code>$els</code> - jQuery object of all input (search) elements to bind.</li>
<li><code>false</code> - boolean flag to force a new search.</li>
</ul>
The external elements (<code>$els</code>) will allow searching the table using "search" and "keyup" events (enter to start & escape to cancel the search), and uses the <ahref="#widget-filter-livesearch"><code>filter_liveSearch</code></a> option, or delayed search.<br>
<br>
Include a <code>data-column="#"</code> attribute (where <code>#</code> is the column number) in the search input, to specify to which column the search should apply ~ see <ahref="example-widget-filter-external-inputs.html">this demo</a> for a full example. <spanclass="label label-warning">Warning!</span>, if no <code>data-column</code> attribute is added to the input, the input will be ignored.<br>
<br>
In <spanclass="version">v2.15</span>, use a <code>data-column="all"</code> to bind an external any-match search filter; but note that adding an external any-match filter using this method will not override the filter set by the <ahref="#widget-filter-external"><code>filter_external</code></a> option.<br>
<br>
The third function parameter, <code>false</code>, is optional. When set to <code>false</code> it forces the inputs to update their values (same as setting the <code>apply</code> flag when using the <ahref="#function-setfilters"><code>setFilters</code></a> function), and reapplies (forces) the current search to be applied again, even if the filter values have not changed; this allows changing the data column attribute dynamically. See the <ahref="example-widget-filter-external-inputs.html">filter external inputs demo</a> for an example.<br>
<br>
<spanclass="label label-warning">Warning!</span> If the third parameter is set to <code>true</code> the saved internal filters (<ahref="#variable-filters"><code>config.$filters</code></a>) will be replaced - not recommended!
<td>This filter widget function allows getting an array of the currently applied filters (<spanclass="version">v2.9</span>; <spanclass="version updated">v2.15</span>)
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
<li><code>flag</code> - boolean flag (optional; <code>false</code> by default), added <spanclass="version">v2.15</span></li>
</ul>
Use this function as follows:<br>
<preclass="prettyprint lang-js">// use $('table') or $('table.hasFilters') to make sure the table has a filter row
// only required if the stickyHeaders or scroller widget is being used (they duplicate the table)
$.tablesorter.getFilters( $('table') );</pre>
This function returns an array of filter values (e.g. <code>[ '', '', '', '', '', '2?%' ]</code>), or <code>false</code> if the selected table does not have a filter row. It will also return an additional parameter if an external input with <code>data-column="all"</code> containing the value used when matching any table column.<br>
<br>
In <spanclass="version updated">v2.15</span>, this function will also return values from any external filters (set either by the <ahref=#filter-external"><code>filter_external</code> option</a> or using the <ahref="#function-bindsearch"><code>bindSearch</code> function</a>) - with or without an internal filter row.<br>
<br>
If the second parameter is set to <code>true</code>, it forces the function to get all of the current filter values directly from the inputs. Otherwise, by default, the function returns the last search as found in this stored data <code>$('table').data('lastSearch');</code>.
<td>This filter widget function allows setting of the filters; include a <code>true</code> boolean to actually apply the search (<spanclass="version">v2.9</span>; <spanclass="version updated">v2.15</span>):
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
<li><code>filter</code> - array of filter values to apply to the table.</li>
<li><code>apply</code> - boolean flag, if <code>false</code> (default setting), the input values are updated, but not searched for within the table.</li>
</ul>
Use this function as follows:<br>
<preclass="prettyprint lang-js">// update filters, but don't apply the search
$.tablesorter.setFilters( $('table'), [ '', '', '', '', '', '2?%' ], true ); // this will now use the search method</pre>
This function returns <code>true</code> if the filters were sucessfully applied, or <code>false</code> if the table does not have a filter row.<br>
<br>
As of <spanclass="version updated">v2.15</span>, this function will also set values in any external filters (set either by the <ahref=#filter-external"><code>filter_external</code> option</a> or using the <ahref="#function-bindsearch"><code>bindSearch</code> function</a>). An additional search parameter can be included to match any column, but please include an external input with <code>data-column="all"</code> using the <code>bindSearch</code> function so your users will know that a search has been applied.<br>
<br>
Also, changed is that when a <code>true</code> value is passed as a third parameter, the search is forced to refresh on the table; otherwise, if the filters set in the search exactly match the previous search, it would be ignored - this was added to prevent numerous ajax calls with exactly the same search or sort parameters (when using the pager).
<td>This resizable widget function allows resetting column width changes and clearing out the saved set widths (<spanclass="version">v2.4</span>; <spanclass="version updated">v2.15</span>)
<td>Added a <code>resize</code> event to the table headers - used by the stickyHeaders widget, but this is a public function available to any widget (<spanclass="version">v2.10</span>).
<divclass="collapsible"><br>
There is no built-in resize event for non-window elements, so when this function is active it triggers a <code>resize</code> event when the header cell changes size. So, if you are writing your own widget and need a header <code>resize</code> event, just include the <code>jquery.tablesorter.widgets.js</code> file, or just the extract the function from that file.<br>
<li><code>table</code> - table DOM element (or jQuery object) of table.</li>
<li><code>key</code> - name of the variable to save</li>
<li><code>value</code> - value of the variable that is saved (for saving only); set to <code>null</code> if wanting to get a value with options.</li>
<li><code>options</code> - storage options; see below</li>
</ul>
This function attempts to give every table a unique identifier using both the page url and table id (or index on the page if no id exists), by default. Here is a usage example and a look at what is stored within the local storage:
// stored as, test = : {"/tablesorter/docs/":{"tablesorter-demo":"123"}}
</pre>
The saved table url & id can be overridden by setting table data attributes <code>data-table-page</code> (url) and <code>data-table-group</code> (id), as in this sample markup:
To change the default data attributes, use the <code>options</code> to modify them as follows:<preclass="prettyprint lang-js">$.tablesorter.storage( table, key, value, {
// table id/group id
id : 'group1',
// this group option sets name of the table attribute with the ID;
// but the value within this data attribute is overridden by the above id option
group: 'data-table-group'
// table pages
url : 'page1',
// this page option sets name of the table attribute with the page/url;
// but the value within the data attribute is overridden by the above url option
page: 'data-table-page'
});</pre>
The priority of table ID settings is as follows:
<ol>
<li><code>options.id</code> setting</li>
<li>Table data attribute (<code>data-table-group</code> by default) value</li>
<li>Table id</li>
<li>Index of the table on the page</li>
</ol>
The priority of table url (group) settings is as follows:
<ol>
<li><code>options.url</code> setting</li>
<li>Table data attribute (<code>data-table-page</code> by default) value</li>
The <ahref="#fixedurl"><code>fixedUrl</code></a> option allows you to override the current page url (it doesn't need to be a url, just some constant value) and save data for multiple tables across a domain. The value from this option has a lower priority than the <code>options</code> id or group settings (see priority list above).<br>
<br>
When using the storage utility to <em>get</em> a value <em>and</em> use custom table options, set the <code>value</code> parameter to <code>null</code>.<br>
<br>
Lastly, this storage utility function needs the <code>parseJSON</code> function available in jQuery v1.4.1+.
<p><strong>Pick n choose</strong> - Place at least the required files in a directory on your webserver that is accessible to a web browser. Record this location.</p>
<li><aclass="external"href="http://jquery.com/download/">jQuery</a> (1.2.6 or higher; some demos &<aclass="external"href="http://api.jquery.com/data/#data-html5">HTML5 data-attributes</a> need jQuery 1.4.3+)</li>
<li><ahref="../js/jquery.tablesorter.widgets.js">jquery.tablesorter.widgets.js</a> (36kb/<ahref="../js/jquery.tablesorter.widgets.min.js">17kb min</a>, includes the jQuery UI theme, columns styling, resizable columns, filter, sticky header and save sort widgets.</li>
<p>First, please review the <aclass="external"href="https://github.com/Mottie/tablesorter/wiki/FAQ">FAQ</a> page to see if it will help you resolve the problem.</p>
<p>If you are having a problem with the plugin or you want to submit a feature request, please <aclass="external"href="https://github.com/Mottie/tablesorter/issues">submit an issue</a>.</p>
<p>Some basic <ahref="../test.html">unit testing</a> has been added (v2.6). If you would like to add more or report a problem, please use the appropriate link above.</p>
<p>For questions about jQuery, try <aclass="external"href="http://irc.jquery.org/">irc</a>, <aclass="external"href="http://stackoverflow.com/tags/jquery/info">stackoverflow</a>, or the <aclass="external"href="http://forum.jquery.com/">jQuery forums</a>.</p>
Additional & Missing documentation, alphanumeric sort, numerous widgets, unit testing and other changes added by <aclass="external"href="https://github.com/Mottie/tablesorter">Mottie</a>.