wiki:TableSorterPlugin

Version 5 (modified by Peter Suter, 5 years ago) (diff)

--

TableSorterPlugin

Description

TableSorterPlugin adds the tablesorter jQuery plugin for turning HTML tables with THEAD and TBODY tags into a sortable table without page refreshes.

Bugs/Feature Requests

Existing bugs and feature requests for TableSorterPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:tablesorterplugin here].

Source

You can check out TableSorterPlugin from here using Subversion, or browse the source with Trac.

Example

The tablesorter plugin requires a THEAD tag, which is not added to normal wiki tables, so use WikiHtml instead. The class tablesorter is also required:

{{{#!html

<table class="tablesorter">
<thead> 
<tr> 
    <th>Last Name</th> 
    <th>First Name</th> 
    <th>Email</th> 
    <th>Due</th> 
    <th>Web Site</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
    <td>Smith</td> 
    <td>John</td> 
    <td>jsmith@gmail.com</td> 
    <td>$50.00</td> 
    <td>http://www.jsmith.com</td> 
</tr> 
<tr> 
    <td>Bach</td> 
    <td>Frank</td> 
    <td>fbach@yahoo.com</td> 
    <td>$50.00</td> 
    <td>http://www.frank.com</td> 
</tr> 
<tr> 
    <td>Doe</td> 
    <td>Jason</td> 
    <td>jdoe@hotmail.com</td> 
    <td>$100.00</td> 
    <td>http://www.jdoe.com</td> 
</tr> 
<tr> 
    <td>Conway</td> 
    <td>Tim</td> 
    <td>tconway@earthlink.net</td> 
    <td>$50.00</td> 
    <td>http://www.timconway.com</td> 
</tr> 
</tbody> 
</table>

}}}

Recent Changes

16381 by psuter on 2017-03-24 18:35:08
TableSorterPlugin: Bump version to 1.1.
(see #12850)
16380 by psuter on 2017-03-24 18:33:06
TableSorterPlugin: Fix problem with multiple tables.
(see #12850)
16371 by psuter on 2017-03-23 23:08:32
TableSorterPlugin: Make work with normal wiki tables.
Use Javascript to move tr rows containing th elements to dynamically created thead,
so jquery.tablesorter can do its magic.
Target all tables with .wiki class automatically so it "just works" without doing anything special.
(see #12850)

This also makes other normal wiki markup like links work.
(see #12624)

(more)

Author/Contributors

Author: psuter
Maintainer: psuter
Contributors:

Attachments (2)

Download all attachments as: .zip