Thread:Balagog gro-Nolob/@comment-5264386-20130121030150/@comment-5123071-20130121031059

You'll need an admin to add this code to MediaWiki:Common.js:

$('table.collapsible').each(function(e) { var $t = $(this);  var $th = $t.find('th');  var hs = ($t.hasClass('collapsed')) ? 'show' : 'hide';  $th.append("[" + hs + "] ");  if($t.hasClass('collapsed')) {    $t.find('td').parent.hide;    }  }); $('.collapseLink > a').click(function(e) { e.preventDefault;  collapseTable($(this));  }); collapseTable = function (e) { $t = e.closest('table'); $elems = $t.find('td').parent; if($t.hasClass('collapsed')) { $elems.show('fast'); $t.removeClass('collapsed'); e.html('hide'); } else { $elems.hide('fast'); $t.addClass('collapsed'); e.html('show'); } }

and this code to MediaWiki:Wikia.css or MediaWiki:Common.css, I don't think it matters but I put it on MediaWiki:Wikia.css:

.collapsible { position: relative; border: 0px !important; padding: 0px !important; margin: 0px !important; width: 100% !important; } .collapseLink { position: absolute; right: 3px; }

Then, just use the code that's used for all the collapsible tables here and it should work.