Forum:I need help with show-hide navigation templates

Hello. I am a sysop on Bioarkistot, the Finnish BIONICLE wiki. I have tried to get the type of navigation templates used in Wikipedia - you know, those 100% wide with show/hide buttons - to work there, since I think they'll be useful. I copied the templates plus the CSS and JavaScript from the Finnish Wikipedia, which is where the links will lead. I think the pages are still understandable even though they're in Finnish - if you need to know what something means, I'll translate.

So... the problem is, they work fine otherwise, but the Näytä/Piilota (show/hide) buttons do not work.

Here are the pages related to this (and Malline is Template in Finnish, by the way):
 * w:c:fi.bionicle:Template:Avattava - a core template used by Malline:Navigaatio (on Wikipedia)
 * w:c:fi.bionicle:Template:Navigaatio - a core template used for the layout of a navigation template (on Wikipedia)
 * w:c:fi.bionicle:Template:AvattavaLoppu - a template that is used to end the code of a navigation template (on Wikipedia)
 * w:c:fi.bionicle:MediaWiki:Common.css - the last code, "NavFrame", is used for these (on Wikipedia)
 * w:c:fi.bionicle:MediaWiki:Common.js - the only code currently, Dynamic Navigation Bars, is used for these (on Wikipedia)

So... can someone help? Am I missing some CSS or JavaScript, or what is this about?  -VezonThunder  (keskustelu) 11:55, September 10, 2009 (UTC)

The show/hide JS by DantMan is better featured and better documented
Check out w:c:dev:ShowHide for comprehensive documentation that you'll never find for the Wikipedia version.

It uses the same three class descriptors (NavHead, NavFrame, NavContent) but the script uses the jQuery library and some features that were never supported by the Wikipedia code have been added (Including language localization via your MediaWiki:Common.js file. --najevi 23:18, September 10, 2009 (UTC)