Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Tablesorter JS

13 sites No security coverage
View on drupal.org

This module adds client-side sorting functionality to tables on your Drupal site, allowing users to click on column headers to sort the data without a page reload. It's designed to be lightweight and compatible with jQuery 4 for Drupal 11 and later.

A lightweight, jQuery 4 compatible client-side table sorting module for Drupal 11+. Add class "tablesorter" to any table to enable click-to-sort on column headers.

Motivation

The Tablesorter module uses the Mottie tablesorter library, which is not compatible with jQuery 4. Drupal 11 ships with jQuery 4, causing JavaScript errors.

The Mottie library uses .bind() and .unbind() methods (~100+ instances) which were removed in jQuery 4. The maintainer stated they would keep using deprecated methods for backwards compatibility. See issue #3517103.

This module provides a simple replacement (~70 lines) covering core sorting functionality.

When to Use This Module

Use when you have:

  • Small to medium tables displayed entirely on the page
  • Static content that doesn't need database queries on sort
  • Simple sorting needs (text and numeric columns)

Do NOT use when you have:

  • Large datasets with thousands of rows
  • Paged tables where sorting should re-query the database
  • Complex needs (custom parsers, multi-column sort, filters)

For server-side sorting, use Drupal core's TableSort.

Features

  • Client-side sorting - no page reload
  • Automatic numeric vs text detection
  • Handles currency ($1,234.56) and percentages
  • Keyboard accessible (Enter/Space)
  • ARIA attributes for screen readers
  • Automatic zebra striping (odd/even classes)
  • jQuery 4 compatible (Drupal 11+)
  • ~70 lines of code

Post-Installation

Add class tablesorter to any table with a <thead>. Works automatically with Tablefield's "sortable" option.

Additional Requirements

None. Uses only Drupal core libraries (jQuery, Drupal, once).

Similar projects

  • Tablesorter - Uses Mottie library, not jQuery 4 compatible
  • DataTables - Full-featured but heavier; not yet Drupal 11 compatible
  • Drupal core TableSort - Server-side only (page reload)

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Jan 2026
Latest release
6 months ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.0-rc5 Pre-release 10–11 Feb 9, 2026
1.0.0-rc4 Pre-release 10–11 Jan 21, 2026
1.0.0-rc3 Pre-release 10–11 Jan 13, 2026
1.0.0-rc2 Pre-release 10–11 Jan 6, 2026
1.0.0-rc1 Pre-release 10–11 Jan 6, 2026