MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
var Button = document.getElementById( 'hideButton' + tableIndex ); | var Button = document.getElementById( 'hideButton' + tableIndex ); | ||
var showTable = document.getElementById( 'hideableTable' + tableIndex ); | var showTable = document.getElementById( 'hideableTable' + tableIndex ); | ||
var | var hideTables = document.getElementsByClassName( 'shown' ); | ||
if ( !showTable || !Button ) { | if ( !showTable || !Button ) { | ||
| Line 38: | Line 38: | ||
} | } | ||
showTable.className = "wikitable hideable hidden shown"; | showTable.className = "wikitable hideable hidden shown"; | ||
/* hide shown tables */ | |||
var Rows = | var j; | ||
for ( j = 0; j < hideTables.length; j++ ) { | |||
var Rows = hideTables[j].rows; | |||
var i; | var i; | ||
| Line 46: | Line 48: | ||
Rows[i].style.display = 'none'; | Rows[i].style.display = 'none'; | ||
} | } | ||
hideTables[j].className = "wikitable hideable hidden"; | |||
} | } | ||
}; | }; | ||