MediaWiki sortable HTML table, not wikicode table

S.Mason

Does the wikimedia sortable table class work with HTML tables with class="wikitable sortable"? I can't find in the documentation. Using version 1.28.1

I added the sortable class and it doesn't do anything.

<table class="wikitable sortable">
 <tr class="column-header"><td>Name</td><td>Desc</td></tr>
 <tr><td>item 1</td><td>item 1 descr</td></tr>
 <tr><td>item 2</td><td>item 2 descr</td></tr>
</table>

Could I be missing CSS or javascript somewhere? It creates the table correctly with the styling but it's not sortable.

S.Mason

It can be done as I found out, the top row has to have th elements:

<table class="wikitable sortable">
 <tr class="column-header"><th>Name</th><th>Desc</th></tr>
 <tr><td>item 1</td><td>item 1 descr</td></tr>
 <tr><td>item 2</td><td>item 2 descr</td></tr>
</table>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Sortable HTML table with Powershell

From Dev

Table with check boxes in MediaWiki

From Dev

Sortable table columns with AngularJs

From Dev

Kendo UI sortable table

From Dev

Sortable table by clicking on headings

From Dev

Sortable table and Draggable TR

From Dev

Sortable table columns with AngularJs

From Dev

Sortable table by clicking on headings

From Dev

sortable table from DB

From Dev

Dynamically hide/show row data in HTML sortable table

From Dev

Dynamically hide/show row data in HTML sortable table

From Dev

MediaWiki table generation with DB data

From Dev

Preventing overlap of picture and table in mediawiki

From Dev

MediaWiki template to filter table contents

From Dev

How to make a Joomla Table sortable?

From Dev

Creating a dynamic table in Confluence that is sortable

From Dev

How to make table columns sortable

From Dev

Dual Sortable table columns in django

From Dev

Datatable dynamically created table not sortable

From Dev

Convert a data.frame into a MediaWiki table

From Dev

Whitespaces caused by infoboxes (table) in mediawiki article

From Dev

Freeze (lock) top row (heading) in MediaWiki table

From Dev

Drag a specific row into a new table with jQuery Sortable

From Dev

jQuery UI Sortable and Table/Cell Size

From Dev

JQuery sortable table plugin not working with tabs

From Dev

Jquery UI Sortable RowSpan inside Table issue

From Dev

Best way of creating a database table sortable by a column

From Dev

Collapsable Table with Sortable, Moving 2 Rows at Once?

From Dev

Reorder table from jqueryUI sortable array