JQuery Plugin Repository

Close Complete List of Plugins

sortDataGrids  |  Category: Tables  |  Modified: 09 Jul 2010  |  Client-side sorting for data grids.

This plugin makes a standard HTML table with THEAD and TBODY tags sortable without page refreshes. tablesorter can successfully parse and sort many types of data including text, numbers, dates, and linked data in a cell.

Summary

Script File

jq.sortDataGrids.js ( view )

Available Options

headers

An array specifying the column(s) (ordered by index, base 0) for which to apply the specified functionality. Default is none, denoted as an empty array, [ ].

widgets

An array specifying additional functionality to apply to the sorting algorithm, most commonly zebra striping, including sorting instructions, and sorting on checkboxes in IE. Default is none, denoted as an empty array, [ ].

Basic Usage

$("ELEMENT").tablesorter();

$("ELEMENT").tablesorter({ options });

Minimum Browser Support

  • Apple Safari 3
  • Google Chrome 1
  • Microsoft Internet Explorer 6
  • Mozilla Firefox 3
  • Opera 9

Example

Name Rank Position SSN DOB
Name Rank Position SSN DOB
Burns, Frank Major Surgeon 012-34-5678 09/29/1939
Houlihan, Margaret Major Head Nurse 234-56-7890 11/04/1937
Hunnicut, BJ Captain Surgeon 901-23-4567 02/06/1939
Klinger, Maxwell Corporal Clerk 345-67-8901 07/01/1934
Mulcahy, Francis Lieutenant Priest 567-89-0123 10/20/1932
Nakahara, Kellye Lieutenant Nurse 890-12-3456 01/02/1950
O'Reilly, Walter Corporal Clerk 456-78-9012 05/24/1940
Pierce, Benjamin Captain Chief Surgeon 678-90-1234 01/28/1936
Potter, Sherman Colonel Commanding Officer 789-01-2345 04/15/1915
Winchester, Charles Major Surgeon 123-45-6789 10/31/1932

Associated Code

<script type="text/javascript">
$(document).ready(function() {
  $("#tblDemo").tablesorter({
    headers : {
      3: { sorter: false }
      },
    widgets : ['zebra','instructions']
    });
  });
</script>

JQuery Plugin Repository | Home | Print

back to ksscholl.com