「利用者:Yasusushi/common.js」の版間の差分
ナビゲーションに移動
検索に移動
rv |
さらにテスト |
||
| 1行目: | 1行目: | ||
function isSortedTablePage() { | |||
return ( wgPageName == "AKB48メンバー一覧" || wgPageName == "SKE48メンバー一覧" ); | |||
} | |||
jQuery( document ).ready( function( $ ) { | |||
' | // wrapped in "mw.loader.using" so this doesn't execute until Tablesorter has loaded | ||
' | mw.loader.using( 'jquery.tablesorter', function() { | ||
' | if( isSortedTablePage() ) $('table.sortable').tablesorter( {sortList: [ { 2: 'desc' }, { 3: 'asc' } ]} ); | ||
// or look for tables with an ID attribute of "sortMe" on any page | |||
' | // $( '#sortMe' ).tablesorter( {sortList: [ { 0: 'asc'} ]} ) | ||
} ); | |||
}); | } ); | ||
2016年6月12日 (日) 11:44時点における版
function isSortedTablePage() {
return ( wgPageName == "AKB48メンバー一覧" || wgPageName == "SKE48メンバー一覧" );
}
jQuery( document ).ready( function( $ ) {
// wrapped in "mw.loader.using" so this doesn't execute until Tablesorter has loaded
mw.loader.using( 'jquery.tablesorter', function() {
if( isSortedTablePage() ) $('table.sortable').tablesorter( {sortList: [ { 2: 'desc' }, { 3: 'asc' } ]} );
// or look for tables with an ID attribute of "sortMe" on any page
// $( '#sortMe' ).tablesorter( {sortList: [ { 0: 'asc'} ]} )
} );
} );