Editing Help:Sorting

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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.)


Note : 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
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">
By saving changes, you agree to the Terms of Use, and you irrevocably agree to release your contribution under the CC BY-SA 4.0 License and the GFDL. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel Editing help (opens in new window)

Wikidata entities used in this page