This Forum has been archived

Forums: Admin Central Index Technical Help Collapsible tables not collapsing
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1782 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Hi, I've been updating the Spanish Silent Hill wiki, including adding collapsible templates to make navigation easier. I've already edited the MediaWiki:Wikia.css‎, MediaWiki:Monobook.css, MediaWiki:Common.css‎, and MediaWiki:Common.js‎‎ pages to match those of the English Silent Hill wiki (which I also admin on), but nothing is working. I don't know if there's some template in there that I'm missing (which wouldn't surprise me since the English wiki is fairly in-depth with its html and templates, whereas the original admin on the Spanish one never touched any templates at all) or what, but I'd love some help with this! :) AlessaGillespie Talk Contributions 05:46, August 27, 2011 (UTC)

For example, you could contain the collapsible tables in a <div> element with class="collapsible." Then, you'll only need this JS:
$('<span id="hidebutton" class="button" onlick="toggleVisibility()" style="float:right;">Hide</span>').insertBefore('.collapsible');
function toggleVisibility() {
$('<span id="showbutton" class="button" onlick="retoggleVisibility()" style="float:right;">Show</span>').insertBefore('.collapsible');
function retoggleVisibility() {
$('<span id="hidebutton" class="button" onlick="toggleVisibility()" style="float:right;">Hide</span>').insertBefore('.collapsible');
Cheers! TK999 09:59, August 27, 2011 (UTC)
Thanks for the help! The problem is now gone. Apparently, just clearing my cache wasn't enough to make the site update the mediawiki changes. It took them about 24 hours to show up, for some reason. Either way, thanks again for the help! :) AlessaGillespie Talk Contributions 08:07, August 28, 2011 (UTC)