MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m sorting |
||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
// | jQuery( document ).ready( function( $ ) { | ||
mw.loader.using( 'jquery.tablesorter', function() { | |||
//$('table.sortable').tablesorter( {sortList: [ { 2: 'desc'} ]} ) | |||
// or look for tables with an ID attribute of "sortMe" on any page | |||
$( '.wikitable.sortable .sortme' ).click(); | |||
$( '.wikitable.sortable .sortme.desc' ).click(); | |||
} ); | |||
} ); | |||
Revision as of 19:45, 16 December 2016
/* Any JavaScript here will be loaded for all users on every page load. */
jQuery( document ).ready( function( $ ) {
mw.loader.using( 'jquery.tablesorter', function() {
//$('table.sortable').tablesorter( {sortList: [ { 2: 'desc'} ]} )
// or look for tables with an ID attribute of "sortMe" on any page
$( '.wikitable.sortable .sortme' ).click();
$( '.wikitable.sortable .sortme.desc' ).click();
} );
} );