Editing Help:Sorting
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 624: | Line 624: | ||
An addition to [[MediaWiki:Common.js]] can be used to "re-sort" a table automatically on the client side when the page loads (as if the user had clicked the header.) The example below sorts all the tables on a set of pages by the first column (see the [[mw:Tablesorter|Tablesorter]] documentation for syntax.) |
An addition to [[MediaWiki:Common.js]] can be used to "re-sort" a table automatically on the client side when the page loads (as if the user had clicked the header.) The example below sorts all the tables on a set of pages by the first column (see the [[mw:Tablesorter|Tablesorter]] documentation for syntax.) |
||
This appears to break sorting by clicking on headers. It sorts ascending on the clicked on header, but won't sort the other way when clicked on again |
|||
<syntaxhighlight lang="javascript"> |
<syntaxhighlight lang="javascript"> |