Forum:Template collapse help needed

I've been having some trouble with a template I've been wanting to put on the Main Page of the wiki I work at. I can't seem to get the contents of this template to collapse. I've already added all the Mediawiki Common.js script already that allows collapsing, and its been there for a while, but everything I try doesn't seem to work. What I specifically mean, is everything below the header (Contents  (view all pages), etc...)  should be automattically collapsed upon loading the page, with the option given to show the contents. The Main Page is already long as it is, I think that allowing this to be autocollapsed would be better than it is now.

Thanks in advance! -- Meghunter99 Talk to me! 14:40, 24 August 2009 (UTC)


 * If the colapse code was added a long time ago, maybe it the old yahoo framework version. Wikia changed to jQuery framework. It's easier to use. — TulipVorlax 18:37, 24 August 2009 (UTC)


 * I should clarify. By my saying its been there for a while, I mean about a week. It wasn't too long ago, and by saying "a while ago", I was implying that the collapse button was not a matter of the cache not being updated. Also, this may have nothing to do with the tables collapsing or anything in the mediawiki common js. I tried everything, but I can't get the contents to collapse they way I want it too, or at all. - Meghunter99 Talk to me! 18:43, 24 August 2009 (UTC)


 * Might not be it since collapsible boxes are still working on my user page of fr.guildwars. — TulipVorlax 19:01, 24 August 2009 (UTC)


 * OK, let's say that I do have it corectly in the common.js. Then, what is necessary to put into the template to make it collapse, because everything I do does not work, and I don't even know how to make it collapse in the first place. Before I just copied other collapsible parameters from other wikis. Any help is appreciated :) -- Meghunter99 Talk to me! 19:07, 24 August 2009 (UTC)
 * You need to create a table with a CSS-defined class (  in this case), and you need a heading . --Michaeldsuarez (Talk) (Deeds) 22:52, 24 August 2009 (UTC)
 * Ya, so basically use a class/id that is collapsible with the JS you used (such as toccolours collaspible collapsed) and define a header (for wikitables, just ! with whatever you want.) That's all you need to do. An example can be seen in w:c:avatar:Template:Avatar1. ~Joey~   ^Talk^  03:25, 25 August 2009 (UTC)

ShowHide code based on jQuery has better features and better documentation
http://dev.wikia.com/wiki/ShowHide Attrib.: DantMan

It has been working a charm for me in both tables and traditional NavFrame DIV blocks. With a minor CSS tweak even image thumbnails can toggled between thumbnail size and full size. --najevi 03:18, 25 August 2009 (UTC)