Skip to content

Somebi/tablesorter

 
 

Repository files navigation

tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.

Demos

Features

  • Multi-column alphanumeric sorting.
  • Multi-tbody sorting - see the options table on the main document page.
  • Parsers for sorting text, alphanumeric text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats) & time. Add your own easily.
  • Support for ROWSPAN and COLSPAN on TH elements.
  • Support secondary "hidden" sorting (e.g., maintain alphabetical sort when sorting on other criteria).
  • Extensibility via widget system.
  • Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+.
  • Small code size.
  • Works with jQuery 1.2.6+ (jQuery 1.4.1+ needed with some widgets).

Licensing

Change Log

View the complete listing here.

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 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.1b (1/7/2013)

  • Updated bootstrap demo
  • It now properly removes the "table-striped" class when the zebra widget is enabled.
  • The demo now uses the refreshWidgets method (added in v2.4) to completely remove the zebra widget.
  • Thanks to potsky for notifying me of this problem!

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