Difference between revisions of "Help:Sorting"

From OutHistory
Jump to navigationJump to search
(New page: Tables can be made sortable via client-side JavaScript with class="sortable". This works in MediaWiki 1.9 and above, which is installed in all Wikimedia projects. Sortable tables are ident...)
 
Line 1: Line 1:
 
Tables can be made sortable via client-side JavaScript with class="sortable". This works in MediaWiki 1.9 and above, which is installed in all Wikimedia projects.
 
Tables can be made sortable via client-side JavaScript with class="sortable". This works in MediaWiki 1.9 and above, which is installed in all Wikimedia projects.
 
Sortable tables are identified by the arrows in each of its header cells. Clicking them will cause the table rows to sort based on the selected column, in ascending order first, and subsequently toggling between ascending and descending order. Links and other wiki-markup are not possible in headers.
 
Sortable tables are identified by the arrows in each of its header cells. Clicking them will cause the table rows to sort based on the selected column, in ascending order first, and subsequently toggling between ascending and descending order. Links and other wiki-markup are not possible in headers.
 +
{| class="wikitable"
 +
|-
 +
! header 1
 +
! header 2
 +
! header 3
 +
|-
 +
| row 1, cell 1
 +
| row 1, cell 2
 +
| row 1, cell 3
 +
|-
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
|}

Revision as of 10:13, 21 July 2008

Tables can be made sortable via client-side JavaScript with class="sortable". This works in MediaWiki 1.9 and above, which is installed in all Wikimedia projects. Sortable tables are identified by the arrows in each of its header cells. Clicking them will cause the table rows to sort based on the selected column, in ascending order first, and subsequently toggling between ascending and descending order. Links and other wiki-markup are not possible in headers.

header 1 header 2 header 3
row 1, cell 1 row 1, cell 2 row 1, cell 3
row 2, cell 1 row 2, cell 2 row 2, cell 3