Skip to content

Older changes 2.13.0

Rob Garrison edited this page May 17, 2018 · 1 revision

Wiki: Home | FAQ | Customize | Snippets | Search | Language | Changes | Older-changes-2.25.0 | Older-changes-2.13.0 | Change summary

Milestones: 2.13 | 2.12 | 2.11 | 2.10 | 2.9 | 2.8 | 2.7 | 2.6 | 2.5 | 2.4 | 2.3 | 2.2 | 2.1 | 2.0.6+ (fork created) | 2.0.5 (original)

Version 2.13.3 (11/9/2013)

  • Pager (plugin/widget)

    • Fixed initial filter settings when using pager ajax. Fixes issue #388.
    • Fixed ajax pager not recognizing column sorting. Fixes issue #408.
    • The core plugin now remove rows from table when using pager ajax. Fixes issue #411.
  • Filter widget

    • Renamed all variables & restructured the entire widget.
    • Added better integration with the pager plugin/widget to minimize ajax server calls by getting default filter settings. Fixes issue #388.
    • Fixed filter formatter HTML5 spinner to properly find exact matches.
    • Added a new fuzzy search parameter
      • Fuzzy searches match sequential characters, similar to how Sublime Text searches work
      • Start the search with a tilde ~ followed by any sequential characters to match.
      • Examples: ~bee will match both "Bruce Lee" and "Brenda Lee", ~bcd will find "Brandon Clark" and ~piano will find "Philip Aaron Wong"
    • Added filter_anyMatch
      • Set this option to true when using an external search filter.
      • Setting this option should work properly with or without the column filters. The only issue you would have is if you triggered a search on the table using an array with undefined or null array values.
      • Some limitations are applied when using any match. Search operators, range queries and not-matches are not allowed.
      • See the demo for examples & more details.
      • Thanks to @prainho for the suggestion, code and feedback in issue #405!
    • Modified the bindSearch function to allow using it on external filters:
      • Use as follows: $.tablesorter.filter.bindSearch( $('table'), $('.search') );
      • Binding the search input using this method allows the search to use filter_liveSearch, delayed searching and pressing escape to clear the search.
      • See the filter any match demo for example usage.
  • UITheme widget

    • Added caption styling
    • Updated css for jQuery UI theme and Bootstrap theme.
  • Theme, demo & doc updates

Version 2.13.2 (11/2/2013)

  • Updated pager & filter widget to work when the pager countChildRows option is true:
    • Filter widget now properly added a "filtered" class to child rows
    • Pager plugin & widget now properly calculate a correct total number of rows
    • See issue #396.
  • Updated editable widget to target table cell children if they exist
    • This fixes the issue in IE where making a table element contenteditable is not allowed.
    • See issue #404 for further details.

Version 2.13.1 (10/31/2013)

  • Fixed filter widget issues
    • filter indexing will now be correct, even if a "tablesorter-filter" input/select doesn't exist in the filter row
    • Already parsed filters (filter-formatter) will not attempt to reparse the value; problem was caused by parsed dates.

Version 2.13 (10/30/2013)

  • Added a "Development" branch to the repository.

    • I have started development on version 3 of tablesorter and this branch will have a basic structure to allow modularization of tablesorter.
    • So far, only the tablesorter core has been restructured and reorganized.
    • Added basic Zepto support to the core and some basic widgets, this is a work-in-progress. See issue #398.
  • Ensure resized headers have stored data, or provide a fallback. Fixes issue #394.

  • Added pager countChildRows option (plugin & widget)

    • When true, the pager treats child rows as if it were a parent row and strictly enforces showing only the set number of pager rows.
    • This can cause problems as a child row may not appear associated with its parent, may be split across pages or possibly distort the table layout if the parent or child row contain row or cell spans.
    • When false the pager always includes the child row with its parent, ignoring the set pager size.
    • See issue #396.
  • Removed triggered change event to fix issue #400.

  • Merged in filter formatter fix for jQuery UI dateFormat conflict; pull #403. Thanks @Craga89!

  • Grouping widget update

    • Added group_separator option which is used when a group-separator-# class name is applied
    • Updated grouping widget demo.
  • Added a file-type parser

    • Optimally used with the grouping widget to sort similar file types (e.g. video extensions: .mp4, .avi, .mov, etc)
    • File type sorting demo added.
  • Updated LESS theme to work properly with LESS 4.1+

  • Other changes

    • Improved formatFloat() replace method.
    • Sorting a zero hex value (0x00) is now possible.

Version 2.12 (10/18/2013)

Core

  • Added numberSorter option allowing you to modify the overall numeric sorter.

  • Updated the textSorter option to allow setting a text sorter for each column.

    • The textSorter functon parameters have changed from (a, b, table, column) to (a, b, direction, column, table).
    • Restructured & combined sorting functions internally so that tablesorter will always sort empty cells no matter what sorting algorithm is used by the textSorter.
    • Renamed $.tablesorter.sortText() to $.tablesorter.sortNatural()
    • Added a new basic alphabetical sort algorithm $.tablesorter.sortText = function(a, b) { return a > b ? 1 : (a < b ? -1 : 0); }; which can be set using the textSorter option.
    • New examples can be found in the updated custom sort demo.
  • Added fixedUrl option for use with the $.tablesorter.storage() function.

    • Setting this with a fixed name (it doesn't need to be a url) allows saving table data (saveSort widget, savePages in pager widget) for tables on multiple pages in a domain.
    • Additional storage options are described below under "Storage".
  • An accurate number of table columns is now contained within table.config.columns. This accounts for multiple header rows, tds, ths, etc.

  • Replaced .innerHTML with jQuery's .html() to fix issues in IE8. Fixes issue #385.

  • Version numbers should now all be accurate, even in the comments.. at least this time ;). Fixes issue #386.

Pager

  • In attempts to initialize the pager after the filter widget:
    • Added a pager widget (still beta testing) to allow initializing the pager after certain widgets (filter widget).
    • Updated tablesorter core (properly count table columns) & filter widget code to allow it to initialize on an empty table (thanks @stanislavprokopov!).
    • Hopefully one or both of these changes fixes issue #388.
    • New pager widget demos: basic & ajax.
  • savePages option
    • Should no longer cause an error if stored data is malformed or unrecognized. Fixes issue #387.
    • The stored size and page is now cleared if the table is destroyed.
  • Fixed an error occuring in IE when trying to determine if a variable is an array (toString function call not recognized). Fixes issue #390.
  • Updated pager rendering to prevent multiple ajax calls.
  • During this update, the pager page size would return as zero and set the totalPages value to inifinity. Yeah, it doesn't do that anymore; but you can still set the pager size to zero if you want!

Widgets

  • Filter widget:
    • Should now properly initialize when the pager plugin/widget is used with ajax and/or the filter_serversideFiltering option is true. Fixes issue #388.
    • Please note that the select dropdowns still sort using the natural sort algorithm, but since it is using the function directly, empty cells will not sort based on the emptyTo option. If this is a big problem, let me know!
  • Grouping widget:
    • Added group_callback option - this sets a callback function which allows modification of each group header label - like adding a subtotal for each group, or something. See the updated demo.
    • Added group_complete option which is "groupingComplete" by default. This is the name of the event that is triggered once the grouping widget has completed updating.
  • Updated the editable widget:
    • Added editable_editComplete option which names the event that is triggered after tablesorter has completed updating the recent edit.
    • You can also bind to the change event for that editable element, but it may occur before tablesorter has updated its internal data cache.
  • Storage
    • The $.tablesorter.storage() function now has options including the fixedUrl option described in the core section above.
    • Also added storage options which can be used for custom widgets: $.tablesorter.storage(table, key, value, { url : 'mydomain', id : 'table-group' }).
    • Additionally, for already build-in widgets, you can apply data-attributes to the table: <table class="tablesorter" data-table-page="mydomain" data-table-group="financial">...</table>.
    • For more details, please see issue #389.

Parsers

  • Added an IPv6 parser
    • This parser will auto-detect (the is function checks for valid IPv6 addresses).
    • Added a new IPv6 parser demo.
    • Included rather extensive unit tests for just this parser o.O.

Version 2.11.1 (10/11/2013)

  • Fixed an updating bug:
    • The pager was not updating properly
    • The updateComplete event was not firing when not using ajax.
    • Thanks @sbine for sharing the fix!

Version 2.11.0 (10/10/2013)

Core

  • Initialized widgets (widgets with options) are now tracked to ensure widget options are extended when using "applyWidgets". Fixes issue #330.
  • An javascript error no longer pops up when setting the delayInit option to true and using the saveSort widget (or triggering a sorton method). Fixes issue #346.
  • Only visible columns will be considered when fixing column widths. Fixes issue #371.
  • Merged in fix for jQuery version check (pull #338). This also fixes issue #379. Thanks @lemoinem!
  • Removed natural sort's ability to sort dates. This shouldn't be a problem since tablesorter uses parsers detect & parse date columns automatically. Fixes issue #373.
  • Fixed issue #381.
    • Any class name that is set by an option and is later used to search for that element now has an empty default class name.
    • The reasoning is that if a developer adds two class names to the option, the jQuery find breaks.
    • All default single class name options are now contained within $.tablesorter.css
    • Options affected include: tableClass, cssAsc, cssDesc, cssHeader, cssIcon, cssHeaderRow, cssProcessing in the core.
    • Note that the cssIcon option retains it's default class name & functionality to not add an <i> inside the table cell if this extra class name is undefined.
    • Widget options affected include: filter_cssFilter and stickyHeaders.
  • Removed return false from header mouse/keyboard interaction. Fixes issue #305 & issue #366.

Parsers

  • Fixed sugar date parser demo to point to the correct parser file and sugarjs resource.
  • General cleaned up date, fraction and metric parsers & fixing of minor bugs.

Build Table Widget (new)

  • Build a table starting with an assortment of data types ( array, text (CSV, HTML) or object (json) ).
  • This widget isn't really a widget because it is run and does it's processing before tablesorter has initialized; but the options for it are contained within the tablesorter widgetOptions.

Column Widget

  • General cleanup

Filter Widget

  • Exact matches can still be made if the user enters an exact match indicator twice (i.e. John== will still find John in the column; before it would think the user was looking for John= after the second = was typed)
  • Dynamically added filter reset buttons will now work automatically. Added by pull #327. Thanks @riker09!
  • Chrome appears to have fixed the hidden input bug, so reverted changes to the basic filter demo. Fixes issue #341.
  • The filter widget will work properly with sub-tables. Fixes issue #354. Thanks @johngrogg!
  • Fixed issues with filter_columnFilters set to false. Fixes issue #355.
  • Searches now have accents replaced if the sortLocaleCompare option is true. Fixes issue #357.
  • Merged in enhancement for the filter widget & updated docs - add row to filter_functions parameters (issue #367, pull #368). Thanks @gknights!
  • FilterFormatter jQuery UI Datepicker now includes the user selected time for comparisons. Thanks @TheSin-!
  • Another fix to the filteFormatter jQuery UI Datepicker to make it work properly with the sticky header widget. Thanks @TheSin-!
  • Removed filter_cssFilter default class name. The "tablesorter-filter" class name is automatically added, and this option now contains any additional class names to add. Fixes issue #381.

Grouping Widget

  • The grouping widget now works across multiple tbodies.
  • Added group-false header option which disables the grouping widget for a specific column. Fixes issue #344.
  • Added the group_collapsed option which when true and the group_collapsible option is also true, all groups will start collapsed. Fulfills issue #352.
  • You can now toggle all group rows by holding down the shift key while clicking on a group header.
  • This widget now works properly with the pager addon (pager addon updated). Fixes issue #281.

StickyHeaders Widget

  • Caption outerheight now used to get the correct full height of the caption. Thanks @TheSin-!
  • stickyHeaders_zIndex option added to allow users to customize their sticky header z-index. Fixes issue #332. Thanks @TheSin-!

UITheme widget

  • Updated Bootstrap theme to work with Bootstrap v3
    • Only additions were made to the sorting icons class names within in the $.tablesorter.themes.bootstrap defaults (contained in the jquery.tablesorter.widgets.js file).
    • So the theme will support all current versions of Bootstrap, just make sure you are using the appropriate icon class name (icon-{name} = v2; glyphicon glyphicon-{name} = v3).
    • Removed the gradient background from the header & footer cells.
    • Added a reduced icon font side for header sort icons.
    • Renamed the pager class from pager to ts-pager as Bootstrap adds a lot of padding to that class. See Bootstrap theme demo.
    • Thanks @YeaYeah for sharing how to fix the top border in issue #365.

Pager

  • Fixed the removeRows option error when set to true.
  • The pager now stores any object returned by the ajaxProcessing function in table.config.pager.ajaxData
    • The object should contain attributes for total (numeric), headers (array) and rows (array of arrays).
    • A replacement output option can also be loaded via this method and must be included in the output attribute (i.e. ajaxData.output).
    • Additional attributes are also available to the output display by using the attribute key wrapped in curly brackets (e.g. {extra} from ajaxData.extra).
    • Additional attributes can also be objects or arrays and can be accessed via the output string as {extra:0} (for arrays) or {extra:key} for objects.
    • The page number is processed first, so it would be possible to use this string {extra:{page}} ({page} is a one-based index), or if you need a different value use {page+1} (zero-based index plus any number), or {page-1} (zero-based index minus any number).
    • For more details, please see issue #326.
    • Thanks @camallen for the suggestions & feedback!
  • The "updateComplete" event should now properly trigger after an ansynchronous ajax call has completed. Fixes issue #343.
  • Added a new savePages option
    • Requires requires the $.tablesorter.storage script within the jquery.tablesorter.widget.js file to work properly.
    • When true, it saves pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js).
    • The pager will continue to function properly without the storage script, it just won't save the current page or pager size.
    • Fulfills enhancement request from issue #345.
  • Removed table update when using ajax with a server that is already doing all of the work. Fixes issue #372 & issue #361. Thanks @sbine!
  • Merged in change to count table th length after ajaxProcessing (pull #383). Thanks @harryxu!
  • Reverted changes made in pull #349 as the error row was not showing because the urls did not exactly equal each other.
  • Child rows within the pager will now properly display/hide. Fixes issue #348.
  • Merged in fix for pager redundant ajax requests (pull #336). Thanks @camallen!
  • Merged in fix for pager totalRows check (pull #324). Thanks @camallen!

Internal fixes

  • Modified the pager plugin internal variables to use p for pager options and c for table config options - for consistency.
  • Cleaned up the formatting of a few parsers (mostly cosmetic!)
  • Some parser functions were added to the $.tablesorter object instead of keeping them as private functions, just because my OCD compelled me to do it.
  • Some of the changes made the parsers are no longer backward compatible to the original version of tablesorter. Break away man, just do it!

Thanks

  • Thanks to @thezoggy and @TheSin- for help maintaining and supporting the tablesorter github project while I was away!
  • Also thanks to everyone else that contributed and even more thanks to those that helped troubleshoot and solve problems!

Version 2.10.8 (6/3/2013)

  • Updated the percent parser to only detect if the content is shorter than 15 characters. This prevents columns with a lot of content and one percent sign (%) from being set to be parsed as a percent numeric column. Fixes issue #320.
  • Updated filter widget & filter_formatter:
    • Added a new filter_defaultAttrib which points to the default 'data-value' attribute in the table header which will contain the filter's default (starting) value and will override any set values within the filter_formatter functions. Updated the custom filter widget function demo age column to show this in action.
    • The $.tablesorter.setFilter() method now properly updates the filter formatter elements when set.
    • The uiDateCompare and uiDatepicker functions now adds a time of 11:59:59 to the "to" date or when a "less than" comparison is made so as to include all times within that selected day.
    • The defaultDate option (not date option, sorry) of the uiDateCompare now properly sets the value upon initialization.
    • The from and to options of the uiDatepicker now properly sets those values properly upon initialization.
    • Fixes issue #321.
  • Fixed stickyHeaders widget:
    • When removing a sticky headers widget, it no longer unbinds scrolling when other sticky headers are still active.
    • Added stickyHeaders_includeCaption option (set as true by default). When this option is false and a caption exists, it will not be included in teh sticky header. Fixes issue #322.

Version 2.10.7 (5/31/2013)

Version 2.10.6 (5/30/2013)

  • Added skipTest options to the HTML5 filter formatter functions. Fixes issue #307.

Version 2.10.5 (5/30/2013)

  • Filter formatter functions now works properly within sticky headers. Fixes issues #290 & #317.

Version 2.10.4 (5/28/2013)

  • Added stickyHeadersInit event, which is triggered on the table after the sticky headers widget has completed initializing.
  • Filtering child rows should now work properly; fixes #306.

Version 2.10.3 (5/27/2013)

  • Updated pager pageSize method to properly store the set page size; fixes #287.

Version 2.10.2 (5/27/2013)

  • The minified scripts are now updated =/.

Version 2.10.1 (5/27/2013)

  • Core fixes

    • Fixed updateAll function to properly refresh the widgets.
    • Added keyboard accessibility
      • Header cells can now be accessed using the tab key and sorted by pressing enter when they have "focus".
      • Thanks to debugwand for sharing the code!
  • Filter widget updates:

    • Added filter_onlyAvail option
    • Added compare option to various filter formatter functions
      • This addition was made to the "uiSpinner", "uiSlider", "html5Range", "html5Number" and the new "uiDateCompare" functions

      • So, for example the html5Number function can be set up as follows:

        filter_formatter : {
          0: function($cell, indx) {
            return $.tablesorter.filterFormatter.html5Number( $cell, indx, {
              value: 1,
              min: 1,
              max: 100,
              delay: true,
              addToggle: false,
              exactMatch: false,
              compare: '>='
            })
          }
        }

        now the number type input will allow filtering rows with values greater than or equal to the selected value.

      • Thanks to The Sin- for sharing the idea and code in issue #304.

    • The jQuery UI Datepicker range filter formatter code has been updated:
      • Use the new uiDateCompare filter formatter for one input comparisons, or use this uiDatepicker update to do comparisons within the two inputs.
      • The two input now functions so that when the "to" input is empty, all dates greater than the "from" date are shown.
      • If the "from" input is empty, all dates less than the "to" input date are shown.
      • Added options textFrom (default is from) and textTo (default is to) to allow changing the text label language.
    • Modified the logical "or" search such that it tries to find an exact match for each "or". For example:
      • If "1|2|3" is entered into the filter, only column cells that exactly match 1, 2, or 3 will be visible.
      • If "Mike|Br|John" is entered, only cells with Mike, Br and John will be visible. If you want to include Bruce, then use a wild card: "Mike|Br*|John".
      • To only match content using the logical "or" search, simply add the class name filter-match to the header cell, then "1|2|3" will show cells with 1, 11, 12, etc.
      • Updated the basic filter widget demo to include a "filter-match" column toggle.
    • Fixed javascript error from improper reference to the "dateFormat". Fixes issue #306.
    • Fixed $.tablesorter.getFilters() and $.tablesorter.setFilters() functions to work properly when the filter_columnFilters option is false (do not build filter row).
    • Fixed filter widget numeric range error introduces in v2.10.0. Sorry =(.
    • Fixed filter search delay issue, again. =(
    • Fixed filter widget data comparisons, so now you can type in the filter something like > 1/1/2010 (using the same date format as the column).
    • Filter search input placeholders can now be set using jQuery data:
      • Previously, only a data attribute could contain the filter placeholder text data-placeholder="Enter something..."
      • Another method using script can now be used: $('.tablesorter th:eq(0)').data('placeholder', 'Enter something...'); (where eq() contains a zero-based index of the column).
    • Optimized filter queries to search already filtered rows if the previous search is contained within the current search. Fulfills part of issue #313.
    • Added a caution note in the filter widget (basic) demo stating the issue with Chrome not rendering search input text properly when previously hidden.
      • For now, I set the filter_hideFilters option to false until the source of this problem is determined.
      • Check out this demo to see the issue (in Chrome); but I think I'm the only one seeing it.
  • Updated the $.tablesorter.storage() function

    • The update is to checking for localStorage browser support.
    • It should now work properly in iOS with private browsing protection.
    • Check out this great summary of Modernizr updates by Paul Irish.
  • Documentation fixes

    • Removed console.log from the documentation script. Fixes issue #309.
    • Updated all <button> elements in the documentation to include a type (<button type="button">) to prevent IE from triggering a form submit. Fixes issue #285.

Version 2.10 (5/8/2013)

  • Core changes:

    • Fixed/updated content selection & form interaction in both headers and sticky headers.
    • Added missing sortBegin event when the sorton method is used. YAY for unit testing!
    • Fixed digit and currency parsers not returning appropriately formatted text, when encountered. Another point for unit testing! :P
  • Added a public function $.tablesorter.addHeaderResizeEvent

    • This function exists within the jquery.tablesorter.widgets.js file.

    • There is no built-in resize event for non-window elements, so when this function is active it triggers a resize event when the header cell changes size.

    • Enable the triggering of header cell resize events as follows:

      var table = $('table')[0],
          disable = false,
          options = {
            timer : 250 // header cell size is checked every 250 milliseconds (1/4 of a second)
          };
      $.tablesorter.addHeaderResizeEvent( table, disable, options );
    • To disable resize event triggering:

      var table = $('table')[0];
      $.tablesorter.addHeaderResizeEvent( table, true );
  • Filter widget updates:

    • Triggered filter searches now properly update the filter column inputs. See issue #146.
    • Added disabled filter styling to the Bootstrap theme. Thanks to riker09 (issue #283).
    • Fixed filter_liveSearch option to properly work in non-webkit browsers. See issue #285.
    • Modified filter_liveSearch to allow adding a numeric value to the option, this sets a character threshold which triggers the search when met. Fulfills issue #286.
    • Fixed select dropdowns within the sticky header now work properly. Fixes issue #288.
    • Added a method to allow properly parsed dates to be comparible using <, <=, >, >= and date ranges. Fulfills issue #302.
    • Added filter_filteredRow option which contains the class name added to each visible filtered row. Used by the pager to properly count filtered rows.
    • Fixed a problem with filter_searchDelay which was broken in v2.9.0. Opps, sorry!
    • Minor tweaks to the filter formatter file to allow elements in multiple tables (removed some IDs). More fixing needed!
  • Sticky Headers widget:

    • Fixed/updated content selection & form interaction in both headers and sticky headers. Fixes issue #57.
    • Fixed an issue with content resizing the table, but not the sticky header.
      • Added stickyHeaders_addResizeEvent option to enable this updating.
      • This option uses the new $.tablesorter.addHeaderResizeEvent function.
      • Fixes issue #289.
    • Added stickyHeaders_offset option
      • This option sets the point where the sticky header locks while scrolling. Allowing space for sticky navigation bars, etc.
      • This option accepts:
        • pixel value: stickyHeaders_offset: 20
        • jQuery selector: stickyHeaders_offset: '.navbar-fixed-top
        • jQuery object: stickyHeaders_offset: $('.navbar-fixed-top')
      • Fullfills feature request #294.
  • Pager addon updates:

    • Controls are now cached internally.

      • table.config.pager.$container now stores the jQuery object targeted by the pager container option.
      • table.config.pager.$goto stores the jQuery object targeted by cssGoto.
      • table.config.pager.$size stores the jQuery object targeted by cssPageSize.
    • Page size selectors should now update properly when the pageSet or pageSize methods are used.

    • The pager should now properly target the first sortable tbody (it will skip any "info-only" tbodies).

    • Fixed pagerComplete callback firing more than once while sorting or filtering. Fixes issue #291.

    • Fixed pager not updating when the filter widget reveals zero matches. Fixes issue #297.

    • The pager ajax function now does better error handling.

    • Updated the pager ajax error displayed row; including updating all themes.

    • Added ajaxObject option:

      • You can now customize how the pager plugin interacts performs its ajax functioning.

      • Modify the ajaxObject to include any of the ajax settings:

        ajaxObject: {
          dataType: 'json'
        }
      • The only option that gets overwritten is the url option. It is set by the ajaxUrl and customAjaxUrl options.

      • Fulfills issue #280.

    • Updated ajaxProcessing to now make returning rows optional, or it can now accept the rows as a jQuery object instead of an array. The addon triggers an "update" event internally, so no need to include that.

      • Return a jQuery object

        ajaxProcessing: function(data, table){
          if (data && data.hasOwnProperty('rows')) {
            var r, row, c, d = data.rows,
            // total number of rows (required)
            total = data.total_rows,
            // array of header names (optional)
            headers = data.headers,
            // all rows: array of arrays; each internal array has the table cell data for that row
            rows = '',
            // len should match pager set size (c.size)
            len = d.length;
            // this will depend on how the json is set up - see City0.json
            // rows
            for ( r=0; r < len; r++ ) {
              rows += '<tr class="ajax-row">'; // new row array
              // cells
              for ( c in d[r] ) {
                if (typeof(c) === "string") {
                  rows += '<td>' + d[r][c] + '</td>'; // add each table cell data to row array
                }
              }
              rows += '</tr>'; // add new row array to rows array
            }
            // don't attach the $(rows) because it's difficult to tell old from new data
            // and no need to trigger an update method, it's done internally
            return [ total, $(rows), headers ];
          }
        },
      • Build the table yourself (just return the total number of rows):

        ajaxProcessing: function(data, table){
          if (data && data.hasOwnProperty('rows')) {
            var r, row, c, d = data.rows,
            // total number of rows (required)
            total = data.total_rows,
            // all rows: array of arrays; each internal array has the table cell data for that row
            rows = '',
            // len should match pager set size (c.size)
            len = d.length;
            // this will depend on how the json is set up - see City0.json
            // rows
            for ( r=0; r < len; r++ ) {
              rows += '<tr class="ajax-row">'; // new row array
              // cells
              for ( c in d[r] ) {
                if (typeof(c) === "string") {
                  rows += '<td>' + d[r][c] + '</td>'; // add each table cell data to row array
                }
              }
              rows += '</tr>'; // add new row array to rows array
            }
            // find first sortable tbody, then add new rows
            table.config.$tbodies.eq(0).html(rows);
            return [ total ];
          }
        },
  • Tablesorter unit testing updates; tests for the following have been added:

    • sortStart, sortBegin & sortEnd events.
    • updateComplete event.
    • empty cells: emptyTo, empty to top, bottom & zero.
    • strings in numeric columns: stringTo, string to max, min, top, bottom & none.
    • sort method
    • table class, table header class & tbody info only class.

Version 2.9.1 (4/13/2013)

  • Modified stickyHeaders widget:
    • Only visible cells within the sticky header will be adjusted
    • Fixes issue #278.
    • Thanks to Exinaus for sharing his code!
    • This change doesn't fix the lag on a table with a lot of visible columns; I don't have an exact number where it will start lagging, but the one in issue #278 had 68 columns.

Version 2.9.0 (4/12/2013)

  • Core changes

    • Added a column sort method.
      • With this method, you can target a header column and trigger a sort:

        $('table').find('th:eq(2)').trigger('sort');
      • 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 next sort order is applied is dependent on other option settings such as initialSortOrder, lockedOrder (set within the headers), sortReset option, sortRestart and will be ignored if the column sort is disabled (sorter: false).

      • Triggering a click on the header cell will not work as expected.

  • Widgets, general

    • All of the current widgets within jquery.tablesorter.widgets.js and in the js/widgets directory use the newest addWidget template, and are no longer compatible with tablesorter versions older than 2.8!
  • Added widget priorities

    • Basically when a widget is added, it can be assigned a priority number and applied in that order from lowest to highest.
    • The priority can be any number and can be thought of as similar to applying a z-index to an element in that multiple widgets can have the same priority.
    • This is needed in case a widget is applied to the table, but is dependent on another widget. For example:
      • The uitheme widget is the first to be applied (priority of 10) because other widgets that copy/clone the table will need the jQuery UI/Bootstrap class names already applied to the table.
      • The sticky headers widget (priority 60) is applied after the filter widget (priority 50), so that it knows to update the filters within the sticky header.
    • Priorities are optional, and any widget applied without a priority value will automatically be assigned a priority of 10.
    • Updated the writing custom widgets demo to show how to add a widget priority.
    • I was planning on adding this in version 3.0, but the need arose sooner with the additions of all of the new widgets.
  • Updated Filter widget

    • Fixed a bug that only occurred when using the filter widget with the pager plugin getting ajax data
      • The pager no longers repeatedly tries to get the first page of table content
      • Fixes issue #270.
    • Fixed filter widget to correctly target the filter row cells.
    • The current filter row cells (td's) are now saved to table.config.$filters.
    • Added a filter_liveSearch option:
      • If true (default), a search is performed while the user is typing, after a short delay.
      • If false, the user will have to press enter on the keyboard to initiate the search
    • Added a filter get method to work with the filter inputs
      • Use $.tablesorter.getFilters( $('table') ); to get an array of the current filters applied to the table
    • Added a filter set method to work with the filter inputs
      • Use $.tablesorter.setFilters( $('table'), ['abc', '1'] ); to set the first two filters values to "abc" and "1" respectively; but this does not initiate a search.
      • Use $.tablesorter.setFilters( $('table'), ['abc', '1'], true ); to set the filters values and initiate a search.
      • The difference between $.tablesorter.setFilters( $('table'), ['abc', '1'] ); and $('table').trigger('search', [ ['abc', '1'] ]); is that the setFilters method will update the actual filter inputs with the search query, whereas the triggered search will not.
      • If the $('table') does not target a table with a filter widget applied, it will return false.
  • Updated Resizable widget

    • Added resizable_addLastColumn option which allows you to make the last column resizable, essentially making a non-full width table resizable.
    • Updated the resizable demo to show this option.
    • The resizable demo also now highlights the non-resizable "Age" column to make it more obvious.
  • Updated Sticky headers widget

    • Added a stickyHeaders_cloneId option
      • This option is only used if the table has an ID defined, then the value from this option will be added to the end of the ID of the cloned sticky table.
      • Default value is -sticky.
      • Fixes issue #271.
    • Fixed an issue with scrolling lag:
      • If the page had a large number of hidden tables (inside tabs), there would be a noticable delay while scrolling up.
      • Only visible tables are now monitored.
      • Fixes issue #278.
    • This widget will now include the table caption in the sticky header:
      • Additional css was added to every theme to apply a background color to the caption, otherwise it would be transparent and content could then be seen to scroll behind it.

        caption { background: #fff; }
      • This fullfills the enhancement request in issue #126.

    • This widget will now include the filter row in the sticky header:
      • The filter row is duplicated, so searches within either filter row will update the content of the other filter row.
      • This fullfills the enhancement request in issue #249.
    • Removed the processing icon from the sticky header (reported via email).
  • Added a content editable widget

    • Added a widget to enable content editing of the table (using the contenteditable attribute), by column.

    • It has four options, used as follows:

      $('table.tablesorter').tablesorter({
        widgets: ['editable'],
        widgetOptions: {
          editable_columns       : [0,1,2],  // array that points to the columns to make editable (zero-based index)
          editable_enterToAccept : true,     // press enter to accept content, or click outside if false
          editable_autoResort    : false,    // auto resort after the content has changed.
          editable_noEdit        : 'no-edit' // class name of cell that is no editable
        }
      });
    • Make a table cell uneditable by added the class no-edit, set in the editable_noEdit option.

    • Added a content editable widget demo.

  • Added Repeat headers widget

    • This widget has always been the example used in the Writing custom widgets demo.

    • It has been updated and now follows the same format as the widget template for tablesorter version 2.9+

    • As written, it will no longer work with tablesorter versions older than 2.8.

    • Only one option for this widget is available:

      $('table.tablesorter').tablesorter({
        widgets: ['zebra', 'scroller'],
        widgetOptions : {
          rowsToSkip : 4 // number of rows to show between the repeated headers
        }
      });
  • Added Scroller widget

    • This widget is a modified version of the scroller widget made by Tim Connell (original demo)

    • It has four options, used as follows:

      $('table.tablesorter').tablesorter({
        widgets: ['zebra', 'scroller'],
        widgetOptions : {
          scroller_height       : 300,  // height of scroll window
          scroller_barWidth     : 17,   // scroll bar width
          scroller_jumpToHeader : true, // header snap to browser top when scrolling the tbody
          scroller_idPrefix     : 's_'  // cloned thead id prefix (random number added to end)
        }
      });
    • Added a scroller widget demo.

  • Updated Pager Plugin

    • Added all pager plugin options within the widget options table on the main documentation page.
    • Added a better example of how to use the customAjaxUrl function.
    • Updated the {page} tag used withing the ajaxUrl option:
      • Previously {page} was replaced with a zero-based index of the targeted page number, now this format can also be used {page+1}.
      • A tag of {page+1} will be replaced with the targeted page number plus one, making it a one-based index.
      • Actually any number can be added, or subtracted, from the page number using this format: {page+2}, {page-1}, {page+10}, etc.
    • The List portion of the {sortList:col} and {filterList:fcol} tag are now optional:
      • These tags are used within the ajaxUrl option.
      • So, {sort:col} and {filter:fcol} can now be used. It just seems clearer/cleaner to me.
    • The pager's ajaxProcessing function is now more flexible
      • When returning the processed ajax data, it was required to return it in this form: [ total, rows, headers ].
      • With this update, you can now also return the data as [ rows, total, headers ].
      • If your database is dynamic and doesn't have a total, then you can just give it a really big number & disable the "last" page button. The only reason the plugin needs the total is to calculate the total pages and to know what number to set when the user clicks on the last page button.
  • General documentation cleanup & updates

Version 2.8.2 (3/28/2013)

  • Updated the "ignore-leads" parser:
    • Renamed the parser to "ignore-articles"
    • Added language support and a few languages
    • Added a method to add custom articles.
    • Please see the updated demo (also renamed)
    • Thanks for thezoggy for feedback.
  • Fixed a bug in the grouping widget demo:
    • The "priority (letter)" column was incorrectly parsing the data which, for some reason, worked in some browsers.
    • Thanks again to thezoggy for reporting this issue.

Version 2.8.1 (3/27/2013)

  • Added customAjaxUrl option to the pager:
    • This function is called after all processing has been applied to the ajaxUrl string.
    • Use this function to make any other string modifications, as desired.
    • Thanks to Cthulhu59 for contributing. See pull request #256.

Version 2.8.0 (3/27/2013)

  • Added an updateAll method

    • This method allows you to update the cache with data from both the thead and tbody of the table.
    • The update method only updates the cache from the tbody.
    • This fixes issue #262.
  • Added a grouping rows widget:

    • It only works in tablesorter 2.8+ and jQuery v1.7+.
    • This widget was added to a subfolder named widgets within the js directory.
    • A group header is added, after sorting a column, which groups rows that match the selector.
    • Selectors include whole words, letters, numbers and dates (year, month, day, weekday and time).
    • Check out the demo and get more details on how to use the widget there.
    • Thanks to Brian Ghidinelli for sharing his custom widget code.
  • Added multiple parsers

  • Tablesorter's "update" method now checks if a column sort has been enabled or disabled:

    • Please note that the sorter precendence (order of priority) is still inforced (reference).

    • So, for example, if you add a "sorter-false" class name to the header, it will disable the column sort if no jQuery data, metadata, headers option or other `"sorter-{some parser}" class name is already in place.

    • To make sure a column becomes disabled, set it's jQuery data, then update:

      $('th:eq(0)').data('sorter', false);
      $('table').trigger('update');
    • Thanks to dibs76 for asking about this on StackOverflow.

    • This is also related to issue #262.

  • Custom parsers detection now has higher priority over default parsers:

    • If your custom parser just has an is() check that only returns false, nothing will change. You can still set the parser using jQuery data, metadata, the headers option or header class name as usual (in this order of priority).
    • What this means is that if you wrote a custom parser with an is() check (which tests the string and returns a boolean where true shows a match for your parser), it would have previously been checked after all of the default parsers were checked.
    • Now the automatic parser detection works in reverse, from newest (custom parsers) to oldest (default parsers). So the default text and digit parsers will always be checked last.
  • The addWidget method will now extend an included options object into the widget options (table.config.widgetOptions).

    • Default widgets will not use this functionality until version 3.0, to keep them backwards compatible.

    • Include any widget options, when writing a new widget, as follows:

      // *******************
      // parameters:
      // table = table object (DOM)
      // c = config object (from table.config)
      // wo = all widget options (from table.config.widgetOptions)
      $.tablesorter.addWidget({
        id: 'myWidget',
        // widget options (added v2.8) - added to table.config.widgetOptions
        options: {
          myWidget_option1 : 'setting1',
          myWidget_option2 : 'setting2'
        },
        // The init function (added v2.0.28) is called only after tablesorter has
        // initialized, but before initial sort & before any of the widgets are applied.
        init: function(table, thisWidget, c, wo){
          // widget initialization code - this is only *RUN ONCE*
          // but in this example, only the format function is called to from here
          // to keep the widget backwards compatible with the original tablesorter
          thisWidget.format(table, config, widgetOptions, true);
        },
        format: function(table, c, wo, initFlag) {
          // widget code to apply to the table *AFTER EACH SORT*
          // the initFlag is true when this format is called from the init
          // function above otherwise initFlag is undefined
          // * see the saveSort widget for a full example *
          // access the widget options as follows:
          if (wo.myWidget_option1 === 'setting1') {
            alert('YAY');
          }
        },
        remove: function(table, c, wo){
          // do what ever needs to be done to remove stuff added by your widget
          // unbind events, restore hidden content, etc.
        }
      });
    • Updated the demo showing how you can write your own widget

  • Updated all methods to stop event propagation past the table. This prevents sorted inner tables from also sorting the outer table. Fixes issue #263.

  • Updated filter widget to restore previous search after an update. Fixes issue #253.

  • Updated bower manifest file, thanks to joyvuu-dave for the pull request #252.

  • Updated several public methods that require a table element:

    • These methods will now accept either a table DOM element or a jQuery object; previously it would only accept a DOM element.
    • Modified these $.tablesorter functions: isProcessing, clearTableBody, destroy, applyWidget and refreshWidgets.
    • Example: $.tablesorter.destroy( document.getElementById('myTable') ); or $.tablesorter.destroy( $('#myTable') );
    • See issue #243.
  • Updated Bootstrap from version 2.1.1 to 2.3.1.

  • Fixed issue with bootstrap demo not working in IE7. It was a silly trailing comma. Fixes issue #265.

  • Fixed the filter widget to work properly across tbodies. It now leaves non-sortable tbodies intact. Fixes issue #264.

  • Fixed the updateCell method which would cause a javascript error when spammed. It would try to resort the table while the tbody was detached.

  • Fixed shortDate parser so that it no longer detects semantic version numbers (e.g. "1.0.0").

  • Fixed the internal getData() function to properly get dashed class names; e.g. "sorter-my-custom-parser" will look for a parser with an id of "my-custom-parser".

  • Fixed IE code examples all appearing in line.

  • Did some general code cleanup and rearranging.

Version 2.7.12 (3/1/2013)

  • Fixed hiding filter rows when using filter_formatter elements. See issue #250.
  • Fixed an issue with updateCell method not removing extra table rows before computing the row index of the cell that was just updated.
  • Added an exactMatch option to the html5color filter_formatter function.
  • Added missing documentation for the updateCell callback method. It's been there for a while!

Version 2.7.11 (2/24/2013)

  • Fixed several javascript errors:

    • Empty cells in a numeric column should no longer cause an error - fixes issue #246.
    • The tablesorter storage function should no longer cause an error when provided an undefined key - fixes issue #244.
  • Added saveSortReset method to clear any saved sorts for a specific table. Use it as follows:

    $('table').trigger('saveSortReset');
  • Added delayed options to several filter formatter functions.

    • Selectors that can be changed quickly - uiSlider, uiRange, uiSpinner, html5Range and html5Number - will now execute the filter query after a short delay.
    • The filter delay time is set in the filter function option filter_searchDelay. The default delay is 300 milliseconds.

Version 2.7.10 (2/22/2013)

  • Updated widget storage function to ensure no invalid strings are passed to the $.parseJSON function.
  • Updated filter widget:
    • When cell content contains quotes and the filter select is added, the quotes are now properly processed to be included within the options. Fixes issue #242.

    • Empty cells are no longer added to the options. If you want to include empty cells, add the following (see this StackOverflow question):

      <span style="display:none">{empty}</span>

      Then you'll get a select dropdown showing {empty} allowing you to select empty content.

Version 2.7.9 (2/20/2013)

  • Fixed an issue with the pager targeting an incorrect page when the table starts out empty.
  • Get the correct number of columns when widthFixed is true and the first row contains a table. See issue #238.

Version 2.7.8 (2/17/2013)

  • Fixed script errors:
    • Comment start was stripped when converting files from UTF-8 w/BOM to UTF-8 w/o BOM.
    • Fixed Firefox error in the filter-formatter files, when HTML5 elements don't exist, oops!

Version 2.7.7 (2/17/2013)

  • Updated the currency parser to ignore formatting (commas, decimals and spaces) when detecting the column parser.

  • Updated the natural sort regex to better work with scientific notation and alphanumerics with the number first - see this issue.

  • Reverted code to only add a colgroup if the widthFixed option is true and no colgroup exists. Fixes issues #238 and #239.

  • Added a tablesorter namespace to all bound events. Fixes issue #233.

  • Added a filterReset method which is the same code executed when the filter_reset element is clicked.

  • Added a pageSet method to the pager which allows you to easily change the pager page (see issue #231):

    // go to page 3
    $('table').trigger('pageSet', 3);
  • Added a range filter to the filter widget.

    • You can now search for a range of values using either of these formats: 10 - 20 or 10 to 20. Note the space before and after the dash so as to differentiate it from a negative sign.
    • You can also use symbols within the range 10% - 20% or $10 - $20.
    • Thanks to matzhu and satacoy for code ideas in issue #166.
  • Added logical AND and OR operators to the filters to the filter widget.

    • Entering box && bat (or box AND bat) will only show rows that contain box and bat within the same column below the filter. It does not search other columns. The spaces between the operators and the queries are important.
    • Entering box|bat (or box OR bat) will only show rows that contain either box or bat within the same column below the filter. It does not search other columns. The spaces between the operators and the queries are important.
    • At this time you cannot combine different operators. So, >= 100 AND <= 200 will not work, use the range filter operator (100 - 200) instead.
    • Using the | (or operator) was previously undocumented, but useable.
    • This was also requested in issue #166.
  • Added a new filter widget option named filter_formatter:

    • This option allows you to add custom selectors into the filter row.

    • Because of the amount of coding, new files named "jquery.tablesorter.widgets-filter-formatter.js" and "filter.formatter.css" were added. They include code to add jQuery UI and HTML5 controls via the filter_formatter option.

    • Filter formatter functions include: "uiSpinner", "uiSlider", "uiRange" (uiSlider ranged), "uiDatepicker" (range only), "html5Number", "html5Range" and "html5Color".

    • As an example, this code will add the jQuery UI spinner to the first column:

      filter_formatter : {
        0 : function($cell, indx){
          return $.tablesorter.filterFormatter.uiSpinner( $cell, indx, {
            value : 0,  // starting value
            min   : 0,  // minimum value
            max   : 50, // maximum value
            step  : 1,  // increment value by
            addToggle: true, // enable or disable the control
            exactMatch: true,
            numberFormat: "n"
          });
        }
      }
    • You can also choose to add the current selector value into a css3 tooltip or into the header by setting the valueToHeader option, if available.

    • Fulfills ErinsMatthew's feature request - issue #232. Thanks for the great idea!

  • NOTE: I know the js folder is getting messy. In version 3, I plan on having a separate folder for widgets and parsers. And with the build system, you'll be able to pick and choose which components you need.

Version 2.7.6 (2/6/2013)

  • Merged in an update from Somebi to fix a javascript error which occurs when the table doesn't have a thead or tbody, or it is already initialized.

Version 2.7.5 (1/31/2013)

  • Added pager pageSize method to the docs.
  • Added chili syntax highlighting script files back to the repo as some other external demos were still linking to it.

Version 2.7.4 (1/29/2013)

  • Fixed an problem with the pager not pointing to a tbody, and breaking on an empty tbody. See issue #223.
  • Modified core to always add a <colgroup> to the table. Only when the widthFixed option is true will it add percentage based widths.
  • Modified the parsers code to no longer require an is function; or if the function is missing, no error will be thrown.
  • Modified the isoDate and usLongDate parsers:
    • isoDate parser will now auto-detect dates with times
    • usLongDate parser will now auto-detect dates in this format: "DD MMMMMMMMM YYYY" (25 Jan 2013)
  • Added manifest files:
    • component.json for bower package manager. Thanks to appleboy; also see issue #190.
    • tablesorter.jquery.json for the jquery plugin registry.
  • Added "updateRows" method which is the exact same as "update", but needed due to issues with Prototype. See issue #217.
  • Added pageSize method to change the pager page size more easily. See issue #218.
  • Added a method to disable specific columns in the resizable widget.
    • Disable a column using jQuery data, metadata, the headers option, or header class name (resizable-false); to see a full list of methods, see the updated demo.
    • Enhancement request from issue #215.
  • Added filter widget change log to the wiki pages.
  • Added a config variable config.columns:
    • This variable indicates the number of columns in the table.
    • Previously, config.parsers.length or config.$headers.length were used. Neither of which were accurate if the table was empty or multiple rows in the header existed.
    • This value may still be inaccurate if a rowspan is used in the header.
  • Updated index page to use jQuery 1.9.
    • jQuery 2.0 is has a bug adding rows to the table, so I didn't upgrade the demos to use it.
    • Changed syntax highlighting script from chilli to google's prettify.

Version 2.7.3 (1/10/2013)

  • Fixed a serious bug in the filter widget that was breaking the widget completely if filter_functions was not defined (introduced in v2.7.2). Fixes issue #213.

Version 2.7.2 (1/8/2013)

  • Updated filter widget to update the filter-select when an update event is triggered. See this StackOverflow question.
  • Replaced background-image: url(); with background-image: none; in all applicable theme files.

Version 2.7.1 (1/4/2013)

  • Added two internal parameters to always make sure we're targeting the correct elements.
  • Added table.config.$table which is a jQuery object of the table.
  • Added table.config.$tbodies which is a jQuery object of sortable tbodies; the ones without the class name in the cssInfoBlock option.
  • Fixed removal methods:
  • Tablesorter destroy will now properly restore the header and remove all bindings.
  • Widgets should now again be removed properly.
  • Updated the storage utility to allow setting a property to an empty string, previously it was just ignored.
  • Fixed pager issues:
  • Pager status will now update properly while filtering rows.
  • Pager status will also update properly after sorting filtered rows.
  • The above issues were fixes for issue #207.
  • Fixed the pager's fixedHeight option to again properly pad the table to maintain the height.

Version 2.7 (12/26/2012)

  • Added headerTemplate option:
  • headerTemplate is a template string which allows adding additional content to the header while it is being built.
  • This template string has two default tags: {content} and {icon}.
  • {content} will be replaced by the current header HTML content.
  • {icon} will be replaced by <i class="tablesorter-icon"></i>, but only if a class name is defined in the cssIcon option.
  • Everything within this template string will be wrapped in a div with class tablesorter-header-inner.
  • The default template is {content}.
  • The following themes DO NEED the icon ({icon}) included in the template: Bootstrap, jQuery UI, Grey and Dropbox.
  • Added onRenderTemplate option:
  • This is a function that is called after the template string has been built, but before the template string is applied to the header and before the onRenderHeader function is called.
  • The onRenderTemplate function receives a column index and template string parameters. The template string, from the headerTemplate option, will already have the {icon} and {content} tags replaced; it's just a string of formatted HTML. When done manipulating this string, return it.
  • Check out the demo here.
  • Updated uitheme widget
    • The uitheme setting is no longer required, use the theme option instead.
    • When using the bootstrap or jui theme, just add the name to the theme option: e.g. theme: "bootstrap".
    • The uitheme widget option will still work, but if the theme name exists within $.tablesorter.themes it will override the uitheme option.
    • Look at the theme demo source for a better example.
  • Fixed sortReset bug - see issue #167.
  • Fixed an issue with the pager resetting to the first page after every sort.
  • Fixed javascript errors popping up when initializing the plugin on an empty table. Fixes issue #206.

Version 2.6.2 (12/20/2012)

  • Fixed sort breaking when tfoot contained a table. Fixes problem mentioned in issue #196.
  • Fixed javascript error due to using hasOwnProperty inside of the formatFloat function in IE8. Fixes issue #200.
  • Fixed the reformatted minified widget file. Fixes issue #201.
  • Fixed pager ajax. It no longer load the initial page twice. Fixes issue #202.

Version 2.6.1 (12/19/2012)

  • Updated the pager

    • Added an event named pagerBeforeInitialized which is triggered after all of the controls have been set up, but before rendering of the table or ajax data is obtained.
    • Cleaned up pager code.
  • Modifed the formatFloat function

    • Previously you had to call the formatFloat function with a table so it could get the number format configuration

      $.tablesorter.formatFloat('1,234,567.89', table); // result if usNumberFormat true = 1234567.89
    • Now you can either pass the table or a boolean to indicate the format:

      var usNumberFormat = true;
      $.tablesorter.formatFloat('1,234', usNumberFormat); // result = 1234
      $.tablesorter.formatFloat('1,234', false); // non-U.S. format result = 1.234
  • Fixed pager size result incorrect with nested tables. Fixes issue #196.

  • Fixed parser javascript error when clearing tr's from table. Fixes issue #199.

  • Fixed themes so that the sorter-false class now restores the header padding. Mentioned in issue #.

Version 2.6 (12/18/2012)

  • Added sortResetKey:
    • By default, holding down the ctrl key while clicking on a header cell will reset that column's sort.
    • When sorting multiple columns, holding shift+ctrl will maintain the previous sorts and reset the selected column.
    • Thanks to emmerich for sharing this code!
  • Added basic unit testing:
    • JSHint checks of core, widgets and pager addon.
    • Checks of various public functions, parsers and methods.
    • This is a work-in-progress, so many more tests still need to be added.
    • See the basic test results here.
  • Sorting arrows no longer show when a header column is disabled. Fixes issue #188.
  • Improved pager AJAX support:
    • Added serverSideSorting option (default is false) to the plugin core which when true will disable client-side sorting.
    • Added filter_serversideFiltering filter widget option (default is false) which when true will disable client-side filter widget processing.
    • Added a filterList ({filterList:fcol}) ajax parameter to the pager's ajaxUrl option.
    • Added cssErrorRow option to the pager options, allowing you to style the ajax error row which only appears with ajax errors.
    • This update also fixes an issue with page size changing. See issue #198.
    • Thanks to dhamma for this enhancement!
  • Added footerRow and footerCells to the tablesorter themes ($.tablesorter.themes):
    • This allows styling of the footer in the bootstrap and jQuery UI themes.
    • Used by the uitheme widget.

Version 2.5 (11/22/2012)

  • Improved multi-column sorting
    • Huge thanks to Nick Craver for making multicolumn sorting no longer uses an eval() during the sort!
    • This change improves performance of the sort across all browsers.
    • It also allows use of numerous minifier scripts.
    • See pull request #177 for more details.
  • Fixed using addRows on an empty table, issue #179.
  • Fixed inconsistencies in the usage of sort up (ascending) and sort down (descending) in the javascript and css.
    • Updated the cssAsc default value to tablesorter-headerAsc.
    • Updated the cssDesc default value to tablesorter-headerDesc.
    • All css themes now include these new class names. References to older class names were not removed, but they will be removed in version 3.
    • Renamed image files and switched data URIs to match these changes.
    • This fixes issue #173. Thanks bitti!
  • Updated all theme css files to use image data URIs instead of the images.
    • The images are all still contained in the css/images directory.
    • References to the image files have been commented out instead of removed.

Version 2.4.8 (11/15/2012)

  • Fixed a few issues:
    • The pager plugin will no longer cause a javascript error when initialized on a table that doesn't have tablesorter applied.
    • The sticky header widget will now add the cloned table with the sticky header AFTER the table, in case the table has an ID applied.
    • See issue #175 for more details.

Version 2.4.7 (11/14/2012)

  • Added sortReset method.
    • This event can be triggered on the table and it will reset all sorts.
    • Added a demo.
    • Fullfills enhancement request from issue #.
  • Added a live LESS theme demo at codepen.io.
  • Fixed QtWebkit browsers (includes Safari & Arora) error when running jQuery v1.8+:
    • The problem was with a selector which worked without any problems until jQuery v1.8+.
    • Fixes issue #132 & #174.
  • Fixed sticky header issues
    • Sticky header bug when the sticky header contained a sticky-false row - see issue #172.
    • Javascript error fixed in IE8 - see issue #.
    • Sticky header breaking when first rows hidden - see issue #168.

Version 2.4.6 (10/25/2012)

  • Filter widget select dropdowns will now trim extra spaces before adding them as an option. Fixes issue #161.
  • Fixed pager addon page size selector. There is an order of priority:
    • If an option has selected="selected" as an attribute, it will override the pager size option.
    • Pager size option is no longer ignored even if no option in the page size select is selected.
    • Fixes an problem brought up in issue #122.
  • The pager plugin will now update when an updateComplete or filterEnd event is triggered on the table.
    • Added to make the pager plugin work with this quicksearch plugin.
    • To make them work together, filtered rows need to get a class name of filtered before triggering the updateComplete event.
    • See issue #160 for more details.

Version 2.4.5 (10/17/2012)

  • The filter widget no longer builds the filter row when all columns have filter-false set. Fixes issue #156.
  • Pager plugin updates:
    • Added an optional ajax url parameter to include the current sort per column
      • Add the {sortList:col} parameter, where col is the actual parameter added to the URL.
      • So this parameter {sortList:sort} with a sortList value of [[2,0],[3,0]] becomes &sort[2]=0&sort[3]=0 in the URL.
      • Thanks to trevorbernard for the enhancement request from issue #155.
    • Fixed an issue with the cssPageSize and cssGoto not becoming disabled when multiple elements exist. Fixes issue #157.

Version 2.4.4 (10/15/2012)

  • Updated pager plugin:
    • Added pagerInitialized event which is triggered after the pager has completed initialization.
    • Added pageMoved event which may fire before the pagerComplete event when ajax processing is involved, or after the pagerComplete on normal use. See issue #153.

Version 2.4.3 (10/13/2012)

  • Fixed an error with the filter widget using parsed data. Fixes issue #149.

Version 2.4.2 (10/13/2012)

  • Updated the Bootstrap theme:
    • Bootstrap demo version updated to v2.1.1.
    • Darkened header gradient - see issue #142.
    • Made some other tweaks to clean up the theme - bold header text, select box sizes (pager), etc.
  • Updated LESS theme to include filter widget styling, column widget footer styling and themes.
  • Updated updateCell method to not use jQuery's closest() function which is not supported by jQuery v1.2.6.
  • Changed tablesorter selectorRemove option default to ".remove-me" (see the pager plugin ajax change below).
  • Fixed sticky headers not scrolling horizontally. Fixes issue #143.
  • Fixed pager plugin Ajax:
    • Ajax loaded tables will no longer hide pages other than the first. Fixes issue #151.
    • Ajax header data now properly replaces the header text.
    • The error message row is now added with the class name from the selectorRemove option.

Version 2.4.1 (9/29/2012)

  • Fixed uitheme widget:
    • A second div is now wrapped around the table cell contents.
    • This allows using relative & absolute positioning on the content as Firefox does not support this directly on table cells.
  • Fixed support for jQuery v1.2.6
    • Core modified to not use closest() function.
    • Resizable widget modified to not use closest() & isEmptyObject functions.

Version 2.4 (9/27/2012)

  • Core changes:

    • Table bodies are now detached before processing the contents. There is a noticable speed increase when sorting large tables, especially in IE. Fix for issue #72 and possibly issue #75.

    • Changed cssChildRow option default from expand-child to tablesorter-childRow to make it more clear.

    • Changed selectorHeaders option default from '> thead th' to `'> thead th, > thead td' to include non-header cells.

    • Fixed sortAppend being applied multiple times when sorting multiple columns. Fix for issue #115.

    • Fixed updateCell method to correctly target the table cell from the cache.

    • Fixed something, somewhere to fix issue #128 LOL... darn you IE!

    • Updated the widthFixed option to set the column widths as a percentage instead of pixels to better resize the table dynamically.

    • Updated the script so that data-column attributes are no longer removed from disabled columns. This fixes an issue where filter-false doesn't apply to disabled columns.

    • Updated the widgets option so that the order of widgets no longer matters. The array now is sorted in reverse alphabetical order, but the zebra widget is always applied last. See the table here.

    • Updated the $.tablesorter.isDigit() function to ensure that no errors pop up when giving it an element of type number. Fix for issue #121.

    • Updated the natural sort function to better sort numbers with leading zeros. See this issue for more details.

    • Updated the code to always check that the sortList option contains numeric values. See issue #127.

    • Updated the date parser to not be so rigid. See issue #125.

    • Updated several internal functions to keep tablesorter compatible with jQuery 1.2.6. Fixs issue #124.

    • Tablesorter can no longer be initialized multiple times on the same table, unless the destroy method is called.

    • Bound events now have unbind executed before bind to fix an issue with Microsoft ajax.net. See issue #119.

    • Added cssHeaderRow option

      • This option contains the class name added to the header row.
      • Previously it got the same class name as cssHeader.
      • Default value is "tablesorter-headerRow".
    • Added cssIcon option:

      • This option contains the class name added to the <i> element that is now automatically added to every header cell.
      • To prevent the plugin from adding an <i> element to the headers, set this option to an empty string.
      • Default value is "tablesorter-icon".
    • Added theme option & new themes!

      • Default theme is now default.
      • Note that ALL of the documentation demos now need the theme option set to "blue" to apply the blue theme.
      • Thanks to thezoggy, numerous themes have been added including default, ice, black-ice, dark & dropbox.
      • Updated hovered row styling to include child rows in some themes (blue, green and less themes).
      • See the column widget update for details on styling of the thead and tfoot cells as well.
      • Removed the blue and green zipped theme files.
    • Added selectorSort option:

      • This option allows you to set which element within the table header triggers the sort.
      • Previously the entire header cell would trigger a sort so any extra elements within the cell would not be clickable.
      • See issue #137.
    • Added cssProcessing option:

      • When true, an indeterminate progress icon is added to the header while tablesorter is sorting or filtering columns.
      • It is disabled by default, but can be enabled by setting the showProcessing option to true.
      • The icon can also be shown using the API: $.tablesorter.isProcessing(table, toggle, $ths);
        • The table parameter is the table to target.
        • toggle is a boolean which when true will add the cssProcessing option class name to the header.
        • The last parameter $ths is optional. When set it will target specific header cells. If undefined, only the sorted headers will be targeted.
      • Note that for small tables, this processing icon may quickly flash and may be distracting. In larger tables, it will be more visible, but may not animate. I believe this is because of all the javascript processing going on (single threaded) prevents the animation from occurring - I'll try to find a better solution.
  • Parsers:

    • All parsers now have publically available methods.
    • Access the parsers using $.tablesorter.parsers.
    • Get the desired parser code using parser = $.tablesorter.getParserById("parser_name").
  • Widgets:

    • All widgets now have publically available methods:
    • Access the widgets using $.tablesorter.widgets.
    • Get the desired widget code using $.tablesorter.getWidgetById("widget_name").
    • Apply all selected widgets from the widgets option directly using $.tablesroter.applyWidget(table, initialize);, where initialize is a boolean indicating to run the widget's init function versus the format function. This is the same as triggering applyWidgets on the table.
    • All widgets now have a remove function which when called will remove the widget from the table, see the writing custom widgets demo page for an example.
    • Updated the destroy method to call all widget's remove function, if it exists.
    • Added a method to refresh widgets:
      • Trigger this method using $('table').trigger('refreshWidgets', [doAll, dontapply]);, or call it directly using $.tablesorter.refreshWidgets(table, doAll, dontapply)
      • If doAll is true it removes all widgets from the table. If false only non-current widgets (from the widgets option) are removed.
      • When done removing widgets, the widget re-initializes the currently selected widgets, unless the dontapply parameter is true leaving the table widget-less.
      • Note that if the widgets 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 $('table')[0].config.widgets = [];
      • Enhancement request from issue #112.
    • Added a jQuery compatibility table to the WidgetOptions section to show the limitations of each widget. See issue #124.
  • Columns widget updates:

    • The column class names from the widgetOptions.columns option can now be applied to the header row (including the sticky header) and footer row.
    • Added a new option named columns_thead which is true by default. Set it to false to not add the columns class name to the header.
    • Added a new option named columns_tfoot which is true by default. Set it to false to not add the columns class name to the footer.
    • In addition to the column class name, the tfoot also gets the class name for an ascending or desending sort obtained from the cssAsc and cssDesc option.
    • Added a remove function method.
  • Filter widget changes:

    • Added the ability to enter operators into the filter. Added < <= >= > ! =.

      • To find values greater than 10, enter >10.
      • To find letters less than M, enter <m, but to find letters greater than M, enter >=n, because >m will include ma because ma > m.
      • To find people that aren't George, enter !George or to only look for males, enter !female. This doesn't work in the quick search filter because
      • Exact matches can be done using quotes, as before, or by using an equal sign =, e.g. find the exact number 10 by using 10=.
      • Note #1 In currency, percent or other numerical columns with numbers, the operators will ignore these extra symbols when parsing the value. So to find values greater than 10%, ignore the percent sign and use > 10.
      • Note #2 when using any of the above operators, the child row content is ignored even if filter_childRows is set to true.
    • Added filter_columnFilters option which when true will add a filter to each column. If false, no filter row is added.

    • Added filter_hideFilters option which when true will hide the filter row initially. The rows is revealed by hovering over the filter row or giving any filter input/select focus.

    • Added filter_reset option which will contain a jQuery selector pointing to a reset element (button or link).

    • Added filter_useParsedData option

      • When true, ALL filter searches will only use parsed data.
      • To only use parsed data in specific columns, set this option to false and use any of the following methods (they all do the same thing), in order of priority:
        • jQuery data data-filter="parsed".
        • metadata class="{ filter: 'parsed'}". This requires the metadata plugin.
        • headers option headers : { 0 : { filter : 'parsed' } }.
        • header class name class="filter-parsed".
      • Remember that parsed data most likely doesn't match the actual table cell text, 20% becomes 20 and Jan 1, 2013 12:01 AM becomes 1357020060000.
      • Enhancement request from issue #96.
    • Added a method to apply a filter to the table when filter_columnFilters is false by triggering a search on the table.

      // search using an array - the index of the array matches the column index
      // [ column0, column1, column2, ..., columnN ]
      var columns = []; // undefined array elements are treated as an empty search ''
      columns[4] = '2?%'; // is equivalent to defining the array this way [ '', '', '', '2?%' ]
      $('table').trigger('search', [columns]);
    • Added "filterInit" triggered event on the table after the filter widget has finished initializing.

    • Added "filterStart" triggered event on the table. Enhancement request from issue #108.

    • Added "filterEnd" triggered event on the table. This is used by the updated pager plugin to allow it to work with the filter widget. Enhancement request from issue #108.

    • Modified filter select dropowns (still added by using filter-select or setting a filter_functions column to true):

      • By default the select will filter exact matches. To only match column content, add a "filter-match" class to the column. Fixes issue #102.
      • The contents of the select are now alphanumerically sorted. Fixes issue #103.
    • The filter widget should properly target columns when multiple header rows with column and row spans are included. Fixes issue #113.

    • Added a remove function method.

  • Resizable widget update

    • Added an option resize to widgetOptions
      • When false the resized columns widths will not save to storage (localStorage/cookie).
      • Default is true which saves resized column widths.
    • Modified the resize method to smooth out the resizing.
    • Right clicking (opening the context menu) on the header will now reset the resizing of the columns. If you right-click on the header with no resized columns, the context menu will open as it normally does.
    • Added a remove function method.
  • saveSort widget update

    • Added an option saveSort to widgetOptions
      • When false the saved sort in storage (localStorage/cookie) will still apply to the table upon initialization, but any new sorts will not save.
      • Default is true which loads the saved sort on initialization and saves, and overwrites, any new sorts of the table.
      • Added a remove function method which only clears the saved sort.
  • Sticky Headers Widget update

    • This widget now clones the entire thead for stickyfying ( yes, I know that isn't a real word :P ). This is a similar method used by jmosbech in his StickyTableHeaders plugin.
    • Header rows containing column and row spans should now correctly align.
    • Attempted to correct the border spacing issue in non-webkit browsers. It's not perfect, so this may be tweaked in the future to make it pixel perfect, if that is ever possible.
    • Added a remove function method.
  • UITheme widget updated to be more generalized:

    • This widget will now apply a jQuery UI or Bootstrap theme. It was designed to me extendable to other platforms.

    • Added a Bootstrap theme demo. This demo also includes the filter widget with the pager plugin to show their interaction and other styling possibilities.

    • To extend the uitheme widget to other platforms, add/extend the theme in the $.tablesorter.themes variable contained in the jquery.tablesorter.widgets.js file.

    • To add either a jQuery UI or Bootstrap theme to the table, set it up as follows (also see the jQuery UI or Bootstrap demo):

      $("table").tablesorter({
        // widget code now contained in the jquery.tablesorter.widgets.js file
        widgets : [ 'uitheme', 'zebra' ],
        widgetOptions : {
          // set the uitheme widget to use the jQuery UI theme class names ## NEW ##
          uitheme : 'jui' // or 'bootstrap'
        }
      });
      • The widgets option must include the uitheme widget.
      • The widgetOptions for uitheme now only contains the name of the platform to use (previously it was the 3 icon class names to use). For now, use either jui for jQuery UI or bootstrap for a Twitter Bootstrap theme.
    • I am working on changing tablesorter's core to do all of this automatically, so if it works out it will be available in tablesorter version 3 and this widget will be obsolete.

    • Bootstrap theme enhancement requested in issue #104.

    • Added a remove function method.

  • Zebra widget updates:

    • It will no longer apply to nested tables. Fix for issue #98 and also fixed by styson in issue #116. Thanks!
    • The zebra widget is needed if using the bootstrap striped theme. See the Bootstrap demo for an example. Fixes issue #111.
    • The tbody is no longer hidden (or removed) when applying row class names. It appears to not change the speed significantly. But please feel free to report any speed issues.
    • Added a remove function method.
  • Pager addon changes:

    • The pager plugin now plays nice with the filter widget.

    Fixes issue #6.

    • Added cssGoto option which contains a jQuery selector pointing to a page select dropdown. Updated the pager demo with an example.
    • Updated pager addon to now work with the filter and advanced filter widgets.
    • Added {filteredRows} and {filteredPages} parameters to the output option. They contain the number of rows and pages that result from the filter widget search.
  • Updated the jquery.metadata.js file to the latest version and modified the code to better work with JSHint.

Version 2.3.11 (7/12/2012)

  • Merged in mmeisel's ipAddress parser fix. Optimized the format code.
  • Merged in two fixes from wwalser. Thanks for finding and fixes this issue!
  • Made the sort functions public. This is in anticipation of using the natural sort function in the filter widget to sort select options.

Version 2.3.10 (6/21/2012)

  • Fixed the filter widget causing an error when initialized on an empty table. Fixes issue #95. Thanks to Raigen for all of the diligent testing!

Version 2.3.9 (6/21/2012)

  • Theme updates:

    • Modified the blue & green themes to make the column colors better match the header.
    • Added row hovered styling.
    • Added a theme.less file which is set up to allow you to set a one color to create a palette of colors for even and odd rows, columns widget styling and row hovered colors.
  • Modified update, updateCell and addRows methods:

    • An updateComplete event is now fired after each method has completed.

    • Added a callback to each method. Used as follows:

      var resort = true, // resort table using the current sort
          callback = function(table){
              alert('new sort applied');
          };
      $("table").trigger("update", [resort, callback]);
  • Added a callback to the sorton method. It is used as follows:

    var sort = [[0,0],[2,0]],
        callback = function(table){
            alert('new sort applied to ' + table.id);
        };
    // Note that the sort value below is inside of another array (inside another set of square brackets)
    // A callback method was added in 2.3.9.
    $("table").trigger("sorton", [sort, callback]);
  • Fixed isDigit function returning true on an empty string. Fix for issue #88.

  • Fixed filter widget:

    • Filter inputs in multiple thead rows now correctly correspond to the column.
    • Fixed filtering of child rows to use the filter_ignoreCase option.
    • Fixed child rows displaying incorrectly when not filtered. Fix for issue #89.
    • The default filter select will now properly update after an update event. Fix for issue #91.
  • Fixed sortList to prevent errors. Fix for issue #92.

  • Fixed onRenderHeader option missing the last column. Fix for issue #93, and thanks to OBCENEIKON for the fix!

Version 2.3.8 (6/5/2012)

  • Filter widget search will now update on table updates. Fix for issue #86.
  • Fixed errors when entering invalid regex into the filter widget search input. Fix for issue #87.
  • Removed unnecessary semi-colons from the unicode characters in the sorting accented characters demo.
  • Added a Language wiki page which contains the character equivalent code for different languages (well only for Polish so far).

Version 2.3.7 (6/3/2012)

  • Updated $.tablesorter.replaceAccents() function to be independent of the table.
    • It was originally table dependent to allow making tables with different languages. I'll have to add another table option to allow this, if the need arises.
    • Modified as suggested in issue #81.
  • Fixed the url parser is function to properly detect complete urls.
  • Fixed an issue with the updateCell method incorrectly targeting the cell when there was more than one row in the header. Fix for issue #83.

Version 2.3.6 (6/1/2012)

  • Made the following enhancements to the filter widget:
    • Include placeholder text in the filter input boxes by adding data-placeholder with the text to the header cell; e.g. data-placeholder="First Name". See the examples in the filter widget demo.
    • Exact match added. Add a quote (single or double) to the end of the string to find an exact match. In the first column enter Clark" to only find "Clark" and not "Brandon Clark".
    • Wild cards added:
      • ? (question mark) finds any single non-space character.
        In the discount column, adding 1?% in the filter will find all percentages between "10%" and "19%". In the last column, J?n will find "Jun" and "Jan".
      • * (asterisk) finds multiple non-space characters.
        In the first column below Enter Br* will find multiple names starting with "Br". Now add a space at the end, and "Bruce" will not be included in the results.
    • Regex added. Search columns using regex. For example enter /20[^0]\d/ in the last column to find all date greater than 2009.
    • Added filter_functions option which allows you to add a select dropdown to the specified column that either gathers the options from the column contents or obtains options from custom function settings. Additionally, you can use this option to apply a custom filter function to the column. For more details, see the new custom filter widget demo.

Version 2.3.5 (5/28/2012)

  • Added more optimizations to speed up IE (except IE7):
    • Hide tbody during manipulation - added "tablesorter-hidden" css definition.
    • Parsing of the table contents using textContent for modern browsers (including IE9); see this jsperf.
    • Columns widget.
    • Filter widget.
    • Zebra widget.
  • Updated the shortDate detection regex to look for two or four grouped digits instead of two through four digits. Fix for issue #76.
  • Widget updates:
    • Added initWidgets option
      • If true, all selected widgets (from the widgets option) will be applied after the table has initialized.
      • when false, selected widgets init function will be called, but not the format function. So none of the widget formating will be applied to the table. Note: almost all included widgets do not use the init function to keep backward compatibility, except for the saveSort widget in which the init function immediately calls the format function. This information is only important if you are writing a custom widget.
      • It would be useful to set this option to false if using the pager plugin along with a very large table, say 1000+ rows. The table will be initialized, but no widgets are applied. Then the pager plugin is called and the table is modified and all of the widgets are applied when completed. So essentially this saves time by only running the widgets once.
      • Modified the pager plugin to make sure it doesn't apply widgets more than once.
    • Added filter widget option filter_ignoreCase:
      • The default setting is true and all searches will be case insensitive.
      • Set this option to false to make the searches case sensitive.
    • Added filter widget option filter_searchDelay:
      • Default set to 300 milliseconds.
      • This is the delay before the filter widget starts searching.
      • This option prevents searching for every character while typing and should make searching large tables faster.
    • Resizable widget will no longer initialize a sort after releasing the mouse.

Version 2.3.4 (5/20/2012)

  • Added selector change suggested by AnthonyM1229 in issue #74 to fix IE8 ignoring class name parsers. Thanks again Anthony for all of your hard work and input!

Version 2.3.3 (5/19/2012)

  • Fixed the method used to get data from jQuery data, meta data, header options or header class names.
    • This should fix the "filter-false" problem reported in issue #73,
    • and fix issue #74 with setting parsers by class name.
  • Performance improvements:
    • Modified the zebra and columns widget to use document fragments to modify changes to the table. I didn't log all of the times, but there was a speed increase in reported time when using the triggered events demo (1022 rows).
    • Changed the shortDate parser to cache header information.
  • Updated multiple demos to show how to set some options using jQuery data, class names, etc.

Version 2.3.2 (5/11/2012)

  • Added a method to remove tablesorter from a table
    • Use $('table').trigger('destroy'); to remove it.
    • Some classes applied by widgets will remain (zebra, columns, etc); but the functionality will be removed. I've been thinking about adding a "remove" function to each widget to specifically remove that widget.
    • Rows hidden by the filter widget will not reappear. I may work on an option to fix that in the future.
    • The "tablesorter" class is removed from the table; but if you want to leave this class, then use this example: $('table').trigger('destroy', [false]);.
  • Fixed percent parser to not be automatically applied to text columns. Fix for issue #67.
  • Fixed filter widget not working in v2.3.1. It was actually a problem with getting jQuery data breaking the widget.
  • The first tbody can now be an info block.
  • The zebra and column widgets should now properly ignore info blocks (it was missing periods in the class selectors!).
  • Text extracted from table cells is now automatically trimmed of extra spaces, tabs and carriage returns. If these elements are important to you, then please refer to the advanced use custom parser demo which allows you to access the table cell $(cell) directly.
  • Fixed and/or updated a bunch of demos:
    • Demos that include jQuery UI seem to need jQuery v1.4+ now or script errors will completely break the plugin. Updated ui theme and sticky headers widget demos.
    • Render headers demo now targets the div wrapping header cell contents. Previously it was a span.

Version 2.3.1 (5/8/2012)

  • Fixed an issue where header & metadata settings would ignore sorter:false inappropriately.
  • Fixed minified version:
    • Apparently Dean Edwards packer now breaks the minified version, so I switched to using Uglify.
    • I prefer Google Closure Complier but it completely removes the eval needed to get multi-column sorting to work unless the "Whitespace only" mode is used and results in a file 2k larger than the Uglify version.
  • Modified header settings to now check for settings with the following priority: jQuery data > metadata > headers option > header class name > overall option. Added:
  • Added the ability to set the sortList via jQuery data. See the updated sortList documents on how to use it
  • Fixed date parsers (isoDate, usLongDate, shortDate and time) which did not handle empty cell data properly.

Version 2.3 (5/8/2012)

  • Added ability to sort all columns under a header cell that spans multiple columns.
    • Previously clicking on the header cell would only sort the left-most column.
    • Added a demo.
  • Added support for "Content-type: application/xhtml+xml". Fix for issue #62. Thanks to MelTraX for the fix!
  • Added delayInit option:
    • This option delays 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.
    • Enhancement suggested by MelTraX in issue #66.
  • Column parsers & settings can now be set using jQuery data.
    • This setting has a higher priority than metadata: jQuery data > metadata > headers option > header class name > overall setting.
    • This applies to the parsers, stringTo and emptyTo options.
  • Nested tables will no longer be targeted inappropriately - change value of selectorHeaders to "> thead th". Fix for issue #65. Thanks to MelTraX for sharing some code!
  • Reordered parsers to detect other numeric parsers before the general one. Fix for issue #64.
  • Completed minor document corrections, general code cleanup, optimization and removal of a global variable.

Version 2.2.2 (5/4/2012)

Version 2.2.1 (5/4/2012)

  • Widgets should now apply properly while the pager is active. Fix for issue #60.

Version 2.2 (5/3/2012)

  • Multiple tbody sorting:
    • Each tbody within a table will now sort separately.
    • To add in a non-sorting tbody, add the class "tablesorter-infoOnly", modifiable by the new cssInfoBlock option
    • See the main document's options table for an example.
    • NOTE 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.
  • Added ignoreCase option:
    • When true (default), text character case is ignored during sorting.
    • If false, upper case characters will sort before lower case characters.
  • Added textSorter option:
  • Modified sortLocaleCompare option:
    • This option no longer switches the sort to use the String.localeCompare method.

    • When this option is true, the text parsed from table cells will convert accented characters to their equivalent to allow the alphanumeric sort to properly sort.

    • If false (default), any accented characters are treated as their value in the standard unicode order.

    • The following characters are replaced for both upper and lower case (information obtained from sugar.js sorting equivalents table):

      • áàâãä replaced with a
      • ç replaced with c
      • éèêë replaced with e
      • íìIîï replaced with i
      • óòôõö replaced with o
      • úùûü replaced with u
      • ß replaced with S
    • If you would like to continuing using the String.localeCompare method, then set the sortLocaleCompare option to false and use the new textSorter option as follows:

      $('table').tablesorter({
        textSorter: function(a,b) {
         return a.localeCompare(b);
        }
      });

Version 2.1.20 (4/28/2012)

  • Optimized table rebuilding after sort by using a document fragment instead of appending cells directly to the table. This results in about a 20% increase in sort speed (very roughly determined).
  • Optimized pager table rebuilding to also use document fragments, and by removing two extra calls that reapplied the current widgets.

Version 2.1.19 (4/23/2012)

  • The filter widget will now ignore leading spaces so when the filter_startsWith is true it will match the text. Fix from issue #55. Thanks to aarkay18 for the code!
  • Fixed a problem with empty table cells returning an empty string instead of parsing the cell - needed when there is HTML like an input tag to process. Reverted the change accidently added back in version 2.1.15.
  • Added a resort flag that when set to false, it will prevent the resorting of the table when "update", "updateCell" or "addRows" is called. Use the appropriate format below:
    • update: `$('table').trigger('update', [false]);
    • updateCell: $('table').trigger('updateCell', [ this, false ]); - see the updating a table cell demo.
    • addRows: $('table').trigger('addRows', [$row, false]); - see the adding table rows demo.

Version 2.1.18 (4/23/2012)

  • When the sticky headers widget is applied to a table with multiple header rows, adding the class name sticky-false to any header row will prevent it from becoming sticky. Thanks to megatom for the suggestion in issue #52!
  • Updated filter widget css to better work with twitter's bootstrap. Fix per issue #54. Thanks thezoggy!
  • Modified the green theme arrows; see the columns style widget demo and choose the green theme to see the change. I've included the PSD files as well.

Version 2.1.17 (4/21/2012)

  • Fixed an error reported in issue #52 which occurrs when using the metadata plugin after the last update.
  • The sticky headers widget will now work properly if TD's are included in the header, but the following should be noted:
    • The selectorHeaders option needs to be changed to thead th, thead td to properly include the TD's.
    • CSS changes to the blue theme were needed and most likely any custom themes to add a background color to these cells.
    • To prevent the TD's from being sortable, add a sorter-false class name to it.
  • Updated the blue theme:
    • TD's in the sticky header should now have a background color applied.
    • Replaced the black arrow background image gifs with data uri. Included comments with white arrow data uri.
  • Updated filter widget to more accurately count the number of columns. There was an issue with multiple header rows.

Version 2.1.16 (4/20/2012)

  • Removed emptyToBottom option. It has been replaced with the emptyTo option.

  • Added emptyTo option:

    • Setting it to top will always sort all empty table cells to the top of the table.
    • bottom will always sort all empty cells to the bottom of the table.
    • none or zero will treat empty cells as if their value was zero.
    • Individual columns can be modified by adding the following, set in order of priority:
      • metadata class="{ empty: 'top' }". This requires the metadata plugin.
      • headers option headers : { 0 : { empty : 'top' } }.
      • header class name class="empty-top".
      • Overall emptyTo option.
    • Updated the sorting empty cells demo.
    • Fix for issue #48.
  • Add stringTo option in version 2.1.16. This options sets the string value for all of the numerical columns.

  • Modified the string option which is only applied to text within a numerical column; setting the value to:

    • max will treat any text in that column as a value greater than the max (more positive) value. Same as the max+ value, which was retained for backwards compatibility.
    • min will treat any text in that column as a value greater than the min (more negative) value. Same as the max- value.
    • top will always sort the text to the top of the column.
    • bottom will always sort the text to the bottom of the column.
    • none or zero will treat the text as if it has a value of zero.
    • Individual columns can be modified by adding the following, set in order of priority:
      • metadata class="{ string: 'top' }". This requires the metadata plugin.
      • headers option headers : { 0 : { string : 'top' } }.
      • header class name class="string-top".
      • Overall stringTo option.
    • Updated the text strings in numerical sort.
    • Fix for issue #50.
  • Fixed sticky header widget to now include multiple rows. Fix for issue #52.

Version 2.1.15 (4/18/2012)

  • Modified the emptyToBottom option:
    • Clarified that setting this option to null will treat empty cells as if they had a value of zero. Fix for issue #48.
    • Modified the script so that empty cells do not call their respective parser to keep the emptyAtBottom functionality working properly. Fix for issue #49.

Version 2.1.14 (4/17/2012)

  • Updated "shortDate" parser to include the time, if provided. I've also updated the Changing the date format demo with a few times.

Version 2.1.13 (4/17/2012)

Version 2.1.12 (4/16/2012)

  • Modified digit parser to assume numbers wrapped in parenthesis are negative numbers.
  • Updated "digit" parser to remove extraneous characters before parsing. This change makes the "digit" parser essentially work the same as the "currency" parser.
  • Updated some regex to increase parsing speed. See this jsperf.

Version 2.1.11 (4/12/2012)

  • Added emptyToBottom option which tells tablesorter how you want it to sort empty table cells. Enhancement from issue #46.
    • true - sort empty table cells to the bottom.
    • false - sort empty table cells to the top.
    • null - sort empty table cells as if the cell has the lowest value (less than "a" and "0").
  • Moved change log from a text file in the repository into the repository wiki pages.

Version 2.1.10 (4/2/2012)

  • Widget data should now save multiple tables on a single page properly. Fix for issue #41.

Version 2.1.9 (3/31/2012)

  • Empty cells in a numerical column should now sort properly.
  • Setting an initial sortList should now set the header sort correctly; so, clicking on the header will properly change the sort direction. Fix for issue #43.

Version 2.1.8 (3/27/2012)

  • Modified blue & green themes by lowering css specificity. The arrows weren't being applied to the header.
  • Updated Sticky Header widget demo page to include a tablesorter theme switcher.

Version 2.1.7 (3/26/2012)

  • Changed default css options to use more unique names:
    • cssHeader is now "tablesorter-header"
    • cssAsc is now "tablesorter-headerSortUp"
    • cssDesc is now "tablesorter-headerSortDown"
    • Updated blue & green styles to use the appropriate names.
    • Left the original css definitions to keep the styles backward compatible.
  • Table header cell content wrapper modification:
    • Previously the content was wrapped with a span, now wrapped with a div
    • Content wrapping div now as the class name of tablesorter-header-inner applied to it.
  • Various widget fixes:
    • The $.tablesorter.storage code now loads saved variables before updating. Fix for issue #41.
    • Reverted the "filter" widget code to work like it is supposed to. Fix for issue #40.
    • Modified the "stickHeaders" widget to now set the width of the content instead of the table cell. It seems to work better. Fix for issue #37
    • Fixed the "uitheme" widget code to update the sorting icon correctly.

Version 2.1.6 (3/22/2012)

  • Pager updates
    • Updated pager css. It wasn't targeting the pager block correctly.
    • Moved pager into the thead and/or tfoot in the pager ajax demo.
    • The pager plugin ajax method should now only target the header column text (not the pager) and first footer row when updating the header text.
  • Sticky Header widget & table css updated:
    • Modified styles to add a border instead of using the row background; border-spacing css set to zero.
    • Sticky header right edge should now align with the table.
    • Removed top margin from IE so it will stick to the top of the browser window.
  • Removed setTimeout functions. More details on why they were removed are described here.

Version 2.1.5 (3/20/2012)

  • The isoDate parser should now allow sorting of empty cells at the bottom. Fix for issue #38.

Version 2.1.4 (3/18/2012)

  • Modified widget scripts to not cause errors when older versions of jQuery are loaded.
  • Updated widget demos to include notes on minimum required jQuery verison.
  • Added $.tablesorter.version function which returns the current version number.

Version 2.1.3.1 (3/17/2012)

  • Merged in bug fixes contributed by Rozwell. Thanks!
  • Updated pager minified version, along with version numbers.

Version 2.1.3 (3/12/2012)

  • Added usNumberFormat option.

  • Set to true for U.S. number format: 1,234,567.89

  • Set to false for German 1.234.567,89 or French 1 234 567,89 formats.'

  • Fix for issue #34 and issue # 31.

  • Changed pager plugin ajax functions & demo

  • The ajaxProcessing function now must now return two or three pieces of information: [ total, rows, headers ]

  • total is the total number of rows in the database.

  • rows is an array of table rows with an array of table cells in each row.

  • headers is an array of header cell text (optional).

     ```javascript
     // process ajax so that the following information is returned:
     // [ total_rows (number), rows (array of arrays), headers (array; optional) ]
     // example:
     [
       // total # rows contained in the database
       100,
       // row data: array of arrays; each internal array has the table data
       [
         [ "row1cell1", "row1cell2", ... "row1cellN" ],
         [ "row2cell1", "row2cell2", ... "row2cellN" ],
          ...
         [ "rowNcell1", "rowNcell2", ... "rowNcellN" ]
       ],
       // header text (optional)
       [ "Header1", "Header2", ... "HeaderN" ]
     ]
     ```
    
  • Modified pager plugin ajax demo to hopefully make the data processing a bit more clear by changing data inside of the City#.json files to rows.

  • The demo json data should now render the unicode characters properly. Switched the files to the proper utf-8 encoding.

  • When no data is returned, the table will now:

    • Insert a row into the header showing the ajax error. If a row is inserted into the tbody, clicking on the header would cause a parser error.
    • Disable the pager so the pager counter won't show zero total rows.
    • Fix for issue dicussed within issue #31.

Version 2.1.2 (3/11/2012)

  • Added table and cellIndex variables to the textExtraction function to allow using a more general function for text extraction.
  • Empty cells will no longer skip the parser allowing extracting data attributes.
  • This was only an issue on table cells with no text.
  • Added a demo to the demos wiki page whichs allows dynamic sorting of checkboxes.

Version 2.1.1 (3/8/2012)

  • Renamed filter_fromStart to filter_startsWith.
  • Fixed an issue with sortRestart not working properly.
    • In turn, sortReset, lockOrder and sortInitialOrder were modified with this change and were made sure to all work properly.
    • The sortInitialOrder will work in either the main options or specifically within the headers option when a particular column needs a different initial sort order.
    • Added a sortReset/sortRestart demo.
    • Resolves issue #30.
  • Updated pager plugin to better work with the sticky header widget.

Version 2.1 (3/7/2012)

  • Added selectorRemove option

  • Any table row with this css class will be removed from the table prior to updating the table contents.

  • The reason this was added was in case a widget or some other script adds rows to the table for styling, or something else. If a table update is triggered ($(table).trigger('update');), all rows in the table will be included in the update.

  • The writing custom widgets demo has been updated to include this class name.

  • The pager plugin update also uses this to remove the row added by the new fixedHeight option.

  • It's default value is tr.remove-me, so it can be modified to remove more than just rows.

  • Fixed a bug that broke the plugin if you set sorter: true in the header options.

  • Pager plugin update

    • Ajax

      • The pager plugin will now interact with a database via JSON. See demo here.

      • Added ajaxUrl option which contains the variables {page} and {size} which will be replaced by the plugin to obtain that data.

        ajaxUrl : "http:/mydatabase.com?page={page}&size={size}"
      • Another option named ajaxProcessing was included to process the data before returning it to the pager plugin. Basically the JSON needs to contain the data to match the example below. An additional required variable is the total number of records or rows needs to be returned.

        // process ajax so that the data object is returned along with the total number of rows
        // example: { "data" : [{ "ID": 1, "Name": "Foo", "Last": "Bar" }], "total_rows" : 100 }
        ajaxProcessing: function(ajax){
          if (ajax && ajax.hasOwnProperty('data')) {
            // return [ "data", "total_rows" ];
            return [ ajax.data, ajax.total_rows ];
          }
        }
      • I tried to make the plugin interact with a database as flexible as possible, but I'm sure I haven't covered every situation. So any and all feedback is welcome!

      • Also, much thanks to kachar for the enhancement request and willingness to help test it!

    • Removed positionFixed and offset options.

    • Added fixedHeight option which replaces the positionFixed and offset options by maintaining the height of the table no matter how few rows are showing. During testing, it displayed some odd behaviour after adding or deleting rows, but it should have been fixed... just please keep an eye out ;).

    • The pager now adds all of its options to the table configuration options within an object named "pager". Basically what this means is that instead of add all of the pager options to be mixed in with the tablesorter options, the pager options have been isolated and can be found by typing this into the browser console: $('table')[0].config.pager.

  • Storage function added named $.tablesorter.storage for use in widgets

  • It is used by various widgets to save data to either local storage (if available) or cookies.

  • This function needs to use JSON.stringify() which is not supported by IE7. If you need to support IE7, then include this library: JSON-js.

  • Use the function with your own custom widgets as follows:

     ```javascript
     // *** Save data (JSON format only) ***
     // val must be valid JSON... use http://jsonlint.com/ to ensure it is valid
     var val = { "mywidget" : "data1" }; // valid JSON uses double quotes
     // $.tablesorter.storage(table, key, val);
     $.tablesorter.storage(table, 'tablesorter-mywidget', val);
    
     // *** Get data: $.tablesorter.storage(table, key); ***
     v = $.tablesorter.storage(table, 'tablesorter-mywidget');
     // val may be empty, so also check for your data
     val = (v && v.hasOwnProperty('mywidget')) ? v.mywidget : '';
     alert(val); // "data1" if saved, or "" if not
     ```
    
  • Added an option named widgetOptions:

  • 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.

  • Only one widget option, widgetZebra will be retained for backwards compatibility with the original plugin.

  • More details for each widget are explained below.

  • Zebra widget:

  • Added zebra options to the new widgetOptions.

     ```javascript
     widgetOptions : {
         zebra : [ "even", "odd" ]
     }
     ```
    
  • This replaces widgetZebra: { css: [ "even", "odd" ] }, but if the widgetZebra option exists, it will over-ride this newer widgetOptions.zebra option in order to maintain backwards compatibility.

  • UI Theme widget:

  • Changed css class of div wrapping the contents of each header cell from "inner" to "tablesorter-inner".

  • Added "ui-state-default" to the table head columns. Thanks to Raigen for sharing the code!

  • Moved widgetUitheme option into the new widgetOptions.

     ```javascript
     widgetOptions : {
         // adding zebra striping, using content and default styles - the ui css removes the background from default
         // even and odd class names included for this demo to allow switching themes
         zebra   : ["ui-widget-content even", "ui-state-default odd"],
    
         // change default uitheme icons - find the full list of icons here: http://jqueryui.com/themeroller/ (hover over them for their name)
         // default icons: ["ui-icon-arrowthick-2-n-s", "ui-icon-arrowthick-1-s", "ui-icon-arrowthick-1-n"]
         // ["up/down arrow (cssHeaders/unsorted)", "down arrow (cssDesc/descending)", "up arrow (cssAsc/ascending)" ]
         uitheme : ["ui-icon-carat-2-n-s", "ui-icon-carat-1-s", "ui-icon-carat-1-n"]
     }
     ```
    
  • Filter widget changes:

  • Added a new filter widget specific option widgetOptions.filter_fromStart which makes the filter only work from the first letter.

  • Added a widgetOptions.filter_cssFilter option which now contains the class name added to the filter row and each input within it. Previously the class name used was "filters" for the row and "filter" for the input, now both are "tablesorter-filter". Thanks to cr125rider for sharing a code fix!

  • Added css3 box sizing to allow a better fitting filter box. Thanks to thezoggy for sharing the code!

  • The css changes were also added to the blue, green and UI style sheets.

  • Updated the filter widget demo with the available options described above; this includes the widgetOptions.filter_childRows option which was previously undocumented, recently renamed.

  • Resizable Columns Widget changes:

  • The resized column width is now saved using the $.tablesorter.storage() function (optional)

  • If the storage function doesn't exist, the widget will still function, but just not save the column width.

  • Save Sort Widget changes:

  • Modified to now use the $.tablesorter.storage() function (required)

  • The storage function is required for this widget to work properly.

  • Previous saved data is not compatible with the changes made and will be ignored.

  • Updated all docs demos to use jQuery 1.7+.

Version 2.0.31 (2012-2-27)

  • Added sortRestart option:
    • When true, this option resets the sort direction so that clicking on an unsorted column will now sort in the sortInitialOrder direction.
    • Clicking on a single column to cancel a multi-sorted table may not initially sort as expected.
    • Requested by severa in issue #30. Thanks!
  • Made some sortReset fixes:
    • Columns widget will now clear it's styling when the sort has reset.
    • Added a demo.
  • Changed the filter widget inputs to be of a search type:
  • Currently only supported by webkit.
  • Requested by cr125rider in issue #29. Thanks!
  • Updated sortLocaleCompare documentation since it was explained incorrectly.
  • Did some general code cleanup and some optimization.

Version 2.0.30.1 (2012-2-20)

  • Modified the "filter" widget to disable the input window instead of setting it with display none. Now the input is disabled and a "disabled" class is applied to allow for further styling.

Version 2.0.30 (2012-2-20)

  • Fixed the total mess I just made with the addWidget init functionality... I need a vacation :P

Version 2.0.29 (2012-2-20)

  • Fixed a problem with the addWidget init function which apparently was always being called, even if you didn't want it! Fix for issue #28. Thanks to thezoggy for helping with troubleshooting!
  • Minor cleanup of sorting class names code.

Version 2.0.28.1 (2012-2-16)

  • Modified the plugin pager to ignore child rows. Fix for issue #27.

Version 2.0.28 (2012-2-1)

  • Added a new function to widgets called "init" which is called upon initialization, before any of the widgets are applied.
    • I added it to allow the "saveSort" widget to get the saved sort data (localStorage or cookie) before the initial sort was applied.

    • The "saveSort" widget is still compatible with the original tablesorter, but the original version will call all of the widgets twice on initialization, if using the "saveSort" widget.

    • New add widget format is as follows:

      ```javascript
      $.tablesorter.addWidget({
        id: 'myWidget',
        init: function(table, allWidgets, thisWidget){
          // widget initialization code - this is only run ONCE
          // but in this example I call the format function because
          // I want to keep it backwards compatible with the original tablesorter
          thisWidget.format(table, true);
        },
        format: function(table, initFlag) {
          // widget code to apply to the table AFTER EACH SORT
          // the initFlag is true when format is called for the first time, but
          // only if it is called from the init function
        }
      });
      ```
      

Version 2.0.27 (2012-1-31)

  • Added sortReset option
    • Setting this option to true, allows you to click on the header a third time to clear the sort
    • Clearing the sort DOES NOT return the table to it's initial unsorted state.
  • Added saveSort widget
    • This widget will save the last sort to local storage, and will fallback to cookies.
    • The widget does use the JSON.stringify function which is not fully supported (IE7), so if you plan to support it and use this widget, please include this JSON library.
  • Fixed pager page size not sticking. Fix for issue #24.

Version 2.0.26 (2012-1-30)

  • Widgets should no longer be applied twice when an initial sort direction is added. Fix for issue #21.
  • Modified Green theme:
    • The Green theme sort direction icon is now applied to only the first span it encounters inside the header. The UI theme adds a second span for it's icon.
    • Essentially to fix this demo which allows switching between all of the themes.
  • Modified the UI theme to now add a div that wraps all of the header cell content to allow positioning of the sort direction icon.

Version 2.0.25.2 (2012-1-27)

  • Changed Blue theme to vertically align arrows. Fix for issue #12.
  • Fixed sticky header widget so varing width columns now update when the pager plugin changes pages. Thanks to locationRoura for reporting this issue.

Version 2.0.25.1 (2011-12-15)

  • Fixed disabled column style for the ui theme widget. Thanks to bbbco for the fix in issue #17.

Version 2.0.25 (2011-12-14)

  • The ui theme and sticky header widgets now work together and update the arrow direction. Fix for issue #15.
  • Empty cells with only a tab or space will now sort at the bottom. Thanks to pursual for the fix for issue #16.

Version 2.0.24 (2011-12-12)

  • Modified empty cell sorting to always sort at the bottom. Fix for issue #14.
  • Updated the sticky header widget to line up properly with the UI theme. Fix for issue #13.

Version 2.0.23.5 (2011-12-6)

  • Updated the sticky header widget again to not interfere with the filter widget. Fix for issue #10.

Version 2.0.23.4 (2011-12-6)

  • Updated the sticky header widget to reposition the sticky header when scrolling left. Fix for issue #9.

Version 2.0.23.3 (2011-11-7)

  • Updated the filter widget:
    • Changed filter input from visibility hidden to display none. Fix/enhancement from issue #7.
    • Modified the widget to better work with child rows. Added the widgetFilterChildRows option. Fix for issue #8.
    • When widgetFilterChildRows is true, all child row content is included in the row filtering; if false, the child row content is ignored.
  • Added tableClass to the documents. Apparently I forgot to add it before.
  • Added a note to the filter demo bringing up issue #6.
  • Miscellaneous updates to the documents.

Version 2.0.23.2 (2011-10-28)

  • Fixed pager size & total pages not being retained after destroying, then restoring the pager. Thanks to crush123 for reporting the problem!

Version 2.0.23.1 (2011-10-26)

  • Fixed the pager plugin to prevent errors when initialized on an empty table. Fix for issue #5.
  • Added a Resizable Column widget
    • At this time, this widget allows resizing the column widths from the header.
    • The column widths are not saved, but if I did consider saving the widths to local storage. I just didn't get around to doing it.
    • Demo page added.
  • Reorganized the next demo links, located at the bottom of every demo page, to match the order on the main document page.

Version 2.0.23 (2011-10-18)

  • Changed the dateFormat option:
  • The settings are now "mmddyyyy", "ddmmyyyy", and "yyyymmdd".
  • Changed the date separator to include any of the following: slash, dash, period, comma, space(s) or tab.
  • The date format parser will only work with a four digit year.
  • Added a demo page.
  • The parser format function is now passed the cell content, table, cell node and cell index: format(s, table, cell, cellIndex){}.

Version 2.0.22.1 (2011-10-15)

  • Updated the stickyHeaders widget
    • Sticky headers will now resize with the browser window

    • Updated blue and green themes to work better with sticky headers.

    • If using the uitheme widget, make sure the 'uitheme' widget is applied before (left of) the 'stickyHeaders' widget, as follows:

      ```javascript
      widgets: ['zebra', 'uitheme', 'stickyHeaders']
      ```
      

Version 2.0.22 (2011-10-13)

  • Updated the pager plugin:
    • Fixed a problem that occurred when removeRows is set to false - fix for issue #4.

    • Added "disable.pager" and "enable.pager" methods to the pager. These are useful if you want to delete a table row with the pager applied.

      ```javascript
      // Delete a row
      // this function targets a button with a "remove" class name inside a table row
      // *************
      // Use delegate or live because `removeRows` is set to `true` in the demo - hidden rows don't exist
      $('table').delegate('button.remove', 'click' ,function(){
        var t = $('table');
        // disabling the pager will restore all table rows
        t.trigger('disable.pager');
        // remove the chosen row
        $(this).closest('tr').remove();
        // restore pager
        t.trigger('enable.pager');
      });
      ```
      
    • Fixed the positionFixed option (which positions the pager below the table) to now include the offset option value.

    • Fixed the pager arrow buttons so that destroying and enabling the pager multiple times doesn't multiply the number of pages changed.

    • Updated the pager demo page to allow deleting rows.

    • General cleanup and added lots of comments in the plugin and demo page on what each pager option does.

  • Made one minor change to the tablesorter plugin to accomidate the pager plugin using the removeRows option.

Version 2.0.21.1 (2011-10-11)

  • Added "stickyHeader" widget to the "jquery.tablesorter.widgets.js" file.
    • This widget makes the header stick to the top of the page while scrolling down.
    • The sticky header is fully functional and will allow you to sort the table.
    • And best of all, it can be applied to the original tablesorter plugin.
    • Thanks to Chris Coyier and his post on persistent headers.
  • Added a compressed widget file named "jquery.tablesorter.widgets.min.js".

Version 2.0.21 (2011-09-22)

  • Added sortBegin event
    • This event is triggered immediately before the actual sort. So this event occurs after the sortStart and after the sortList option has been updated.
    • It was added to allow for changing the sort dynamically. See issue #3.
  • Added removeRows option to the pager plugin
    • When true, the default value, the pager plugin removes all non-active rows from the table. This greatly increases the sort speed of large tables.
    • When false, the pager plugin merely hides the non-active rows so they all continue to exist in the table. This should allow for better access to data within the table (i.e. submitting form elements)

Version 2.0.20.1 (2011-09-16)

  • Oops fixed currency sorting

Version 2.0.20 (2011-09-16)

  • Filter Widget
    • Added "filter" to the "headers" option to allow disabling the filter option for a specific column - thanks jizo!
    • Added "filter-false" class, that when applied will disable the filter widget for that column.
    • Updated the headers docs and the filter widget demo.
  • Updated the currency parser to use unicode characters to better work in different document formats.

Version 2.0.19 (2011-09-16)

  • Added code in attempt to clear the table headers between multiple tables - fix for issue #2.
  • Cleaned up some code and wrapped the widget code to prevent conflicts with other javascript libraries.
  • Updated the columns widget:
    • Added css examples to the demo.
    • Removed the widgetColumns option from the core, but it is still used by the widget - the way it is used hasn't changed.
  • Updated the uitheme widget:
    • Added widgetUitheme option - used by the widget, but not included in the core. See the demo for a better example.
    • Example added to the uitheme widget demo.

Version 2.0.18.1 (2011-09-14)

  • Updated the "uitheme" widget with method to add zebra striping and hovered header classes.

Version 2.0.18 (2011-09-13)

  • Fixed a bug in the column widget, it would cause an error if no initial sort was set.
  • Fixed a bug where an error would occur if a widget doesn't exist.
  • Updated pager widget to allow restoring the pager plugin & updated demo.
  • Added column filter widget. It is designed so that each column has an filter.

Version 2.0.17 (2011-09-11)

  • Added a jquery.tablesorter.widget.js file:
    • It contains the "uitheme" widget, to add any jQuery UI theme, and the new "columns" widget, to style columns.
    • The blue and green themes have been updated with the added styles from the columns widget.
    • Added a Columns Widget demo and instructions.
  • Added a widgetColumns option which defines the css classes added by the columns widget.
  • Added notes to the pager plugin demo page to better specify when a change was added.
  • The green theme header images have been modified to better work with variable width tables.

Version 2.0.16 (2011-09-08)

  • Added notes to demo pages to indicate if the original (version 2.0.5, at tablesorter.com) does have that option or method.
  • Added "addRows" method that allows adding table rows.
    • This method differs from the "update" method in that it only adds rows to the cache.
    • Use this new method to add rows to a table with the pager plugin applied. Using the "update" method on a table with the pager plugin will remove all hidden rows from the cache.
  • Added a "destroy.pager" method to remove the pager from the table - pager demo updated.

Version 2.0.15 (2011-08-23)

  • Fixed a problem that caused a javascript error when a table header cell doesn't have a class name.

Version 2.0.14 (2011-08-22)

  • Reverted the changes made in 2.0.13 and added checks to prevent errors.
  • Allowed sorting an empty table which would then automatically sort its contents when the table is updated.
  • Modified "Update" and "UpdateCell" methods to automatically resort the table using the existing sort.
  • Updated the Initializing tablesorter on an empty table demo and Updating a table cell.

Version 2.0.13 (2011-08-19)

  • Fixed a problem where a javascript error would occur when initializing a multi sort on an empty table. Thanks again to Eugene Ivakhiv!

Version 2.0.12 (2011-08-19)

  • Updated the textExtraction functionality
    • The original textExtraction function was only able to be applied to all the cells in the table.

    • Apparently the ability to define textExtraction on a per column basis was misinterpreted by me, so now I've added it.

    • Use the option as follows:

      $("table").tablesorter({
          textExtraction: {
              0: function(node) { return $(node).find(selector1).text(); },
              1: function(node) { return $(node).find(selector2).text(); },
              // etc
          }
      });
    • Updated the Dealing with markup inside cells demo.

    • Thanks to Eugene Ivakhiv for reporting this issue to my attention in my blog.

Version 2.0.11 (2011-08-04)

  • Added the ability to set a column parser using a class name
    • When setting the parser, start the class name with "sorter-" followed by the parser name, e.g. "sorter-text" or "sorter-digit"
    • The column can be disabled by setting the class name to "sorter-false"
    • Demo page included.
    • Custom parsers can also be used - see the updated writing custom parsers demo.

Version 2.0.10 (2011-07-31)

  • Modified the numeric sort with a new method to deal with non-numeric content:
    • When sorting columns with numeric values, by default any non-numeric or empty cells are treated as if they have a zero value. This puts the text between negative and positive values in a column.
    • Adding string : "max+" to the headers option will now treat any non-numeric table cells as if they have a maxiumum positive value (a value greater than the maximum positive value in the column).
    • Adding string : "max-" to the headers option will now treat any non-numeric table cells as if they have a maxiumum negative value (a value greater than the maximum negative value in the column).
    • See the "Dealing with text strings in numeric sorts" demo for a better visual example.
  • Changed UI theme widget code to use "ui-widget-header" instead of "ui-widget-default" to better match the themes.
  • Renamed changelog.markdown to changelog.txt to prevent downloading when clicking on the link

Version 2.0.9 (2011-07-27)

  • Added a jQuery UI theme and widget example. To apply the jQuery UI theme:
    • Include any jQuery UI theme on your page.
    • Add the base tablesorter ui theme (located in css/ui directory)
    • Add the jQuery UI theme widget code found on this example page. This demo page includes the UI theme switcher.
  • Added a header index to the onRenderHeader function to make it easier to target specific header cells for modification. See the render header example for an example.
  • Pager plugin updates:
    • Removed the separator option and added an output option which allows you to completely customize the output string.
    • In the output string, include any of the following variables:
      • {page} is replaced with the current page number.
      • {totalPages} is replaced with the total number of pages.
      • {startRow} is replaced with the number of the visible start row of the pager.
      • {endRow} is replaced with the number of the visible end row of the pager.
      • {totalRows} is replaced with the total number of rows.
    • The cssPageDisplay option can now target any element; in previous versions, this element was an input of type text.
    • Added a pagerArrows and cssDisabled options:
      • When pagerArrows is true, the first and previous pager arrows have the css class name contained in the cssDisabled option applied when the first row is visible.
      • The next and last pager arrows will be have the cssDisabled class applied when the last row is visible.
      • Additionally, if the number of table rows is less than the pager size, the pager will get the cssDisabled class name applied.
      • If false (the default setting), the pager arrows class names will not change.
      • Please see the updated pager demo to see this working.

Version 2.0.8 (2011-07-21)

  • Fixed parsers for currency and digits to work with number values separated by commas. Thanks to Josh Renaud for the information!
  • Fixed "lockedOrder" header option and added documentation and an example on how to use it.
  • Made the sort order "desc" only trigger off of the first letter, so any word/abbreviation starting with "d" will set the descending sort order, all other letters will set the order to ascending (shhh, because I'm a bad speller :P)
  • Modified the "sortInitialOrder" option so it can also be set in the headers option.

Version 2.0.7 (2011-07-17)

  • Added "pagerChange" and "pagerComplete" events to the pager plugin which trigger on the table. See the pager demo for an example on how to bind to them.
  • Added the "sortAppend" since the option was there, but apparently the code wasn't.
  • Added missing documentation from my blog post
  • This included a few new example pages: apply widgets, child rows, render header, sort append and zebra widget.
  • Added a methods and events table.
  • Fixed the minified version. Apparently sorting functions called by the eval were removed by the Google Closure Compiler. Resolved by using "Whitespace only" optimization.
  • Fixed syntax highlighting; updated Chili.

Version 2.0.6 (2011-06-22)

  • Forked original files and docs from tablesorter.com to GitHub.
  • Replaced alphabetical sort with an alphanumeric sort
  • This "slower" sort can be disabled by setting the sortLocaleCompare option to true
  • The sortLocaleCompare option's default was changed to false.
  • Added a very basic demo.
  • Added tableClass option
  • The value is "tablesorter" by default and should no longer be required in the default markup.
  • This class is applied to the table in the script and should match the css styling.
  • Each header cell now has its content wrapped with a span.
  • This allows applying the direction icon to the span instead of the entire cell.
  • Although, this might just be extra markup with the advent of multiple background images and gradient backgrounds available in CSS3.
  • Reformatted the code to make jSLint "happier".
  • General
  • Added "cssChildRow" option - attach a child row to its parent.
  • Added "sortLocaleCompare" to use the native String.localeCampare method during text sort.
  • Added "onRenderHeader" function that is called when classes are added to the header cells.
  • Added "selectorHeaders" option to target the the header cells.
  • Changed multisort function

Version 2.0.3 (2008-03-17)

  • Bug fixes - Missing semicolon, broke the minified version.

Version 2.0.2 (2008-03-14)

  • General

  • Added support for the new metadata plugin.

  • Added support for jQuery 1.2.3.

  • Added support for decimal numbers and negative and positive digits.

  • Updated documenation and website with new examples.

  • Removed packed version.

  • Bug fixes

  • Sort force (Thanks to David Lynch).

Version 2.0.1 (2007-09-17)

  • General

  • Removed the need for Dimensions plugin when using the pagnation plugin thanks to offset being included in the jQuery 1.2 core.

  • Added support for jQuery 1.2.

  • Added new Minified version of tablesorter.

  • Updated documenation and website with new examples.

  • Bug fixes

  • If row values are identical the original order is kept (Thanks to David hull).

  • If thead includes a table $('tbody:first', table) breaks (Thanks to David Hull).

  • Speed improvements:

  • appendToTable, setting innerHTML to "" before appending new content to table body.

  • zebra widget. (Thanks to James Dempster).

Clone this wiki locally