Forum:Hide/show in infoboxes

Hi all, how do I add the "hide/show" option in infoboxes? I copy/pasted it from other wikis, but that doesn't work; something must be missing in our files (wiki: Combine OverWiki). Klow 19:19, February 23, 2010 (UTC)


 * Yes - you need to add some javascript to your's or the site's MediaWiki:Common.js. You can simply add, which means it'll draw scripts from the developers wiki. Alternatively, you can copy the entire code from Developers.  Wjxhuang ,  the 888th Avatar  {Talk} 22:11, February 23, 2010 (UTC)


 * Great walkthrough at my blog. Joey (talk) 22:13, February 23, 2010 (UTC)


 * I. am. completely. lost. Joey, I read your walkthrough and read what you linked to, and I just don't get it. I added stuff that I don't know what that is to the specified MediaWiki pages, and nothing happens. Something may be still missing, or maybe there are conflicts in some codes. I'm just completely clueless. I don't understand why it's all there in most wikis and that there's nothing in ours. HELP!! Klow 22:32, February 23, 2010 (UTC)


 * Hmm, I'm seeing collapsible tables work correctly on one of your templates - this one - perhaps refresh the page? Wjxhuang,  the 888th Avatar  {Talk} 22:42, February 23, 2010 (UTC)


 * But also, in your common.js, you've imported/copied multiple versions of the same code. They conflict with each other - so on that template for example you have show appearing behind hide when you expand it. You only need one version - probably getting rid of the Wikipedia one (the one with the entire code copied over) is better. Wjxhuang,  the 888th Avatar  {Talk} 22:48, February 23, 2010 (UTC)


 * Ah yeah that works, sorry! But where does the Wikipedia script end in Commons.js? Klow 22:59, February 23, 2010 (UTC)


 * Thanks Joey for the cleanup! So, one last thing: how do I change the show/hide pos and their color?... Klow 23:03, February 23, 2010 (UTC)


 * Should be good now. You were using both Wikipedia's and Dantman's js, when you can only use one. (I'm pretty sure the first step of my walkthrough covered that). You only had to add that one line import and clear your cache for it to have worked. Joey (talk) 23:07, February 23, 2010 (UTC)


 * Well I might have missed it... So now, what about the color and position? What do I have to change in Common.css?... Klow 23:14, February 23, 2010 (UTC)


 * Joeyaa you walk through was of great assistance, thanks. Though as with Klow, how/is there a way to change the colour of the show/hide text? --Tangerineduel 15:49, February 28, 2010 (UTC)


 * CSS. --Zapwire (talk/blog/edits) 00:12, March 1, 2010 (UTC)


 * It's obviously in the CSS, but where?? Klow 09:33, March 1, 2010 (UTC)


 * Seconded once more. --Tangerineduel 12:09, March 1, 2010 (UTC)

(unindent) Klow. I recently put show/hide tables on the wiki I work on. Here is some how-to info I put together:
 * http://cannabis.wikia.com/wiki/User:Timeshifter/Collapsed_table_via_NavFrame

I decided to set the colors with inline styling for now. --Timeshifter 10:04, March 7, 2010 (UTC)


 * Thanks for that but I'm kinda lost. I don't even know where to look. Klow 10:22, March 7, 2010 (UTC)

.collapseButton { color:blah;float:whatever; } into Common.css (so it'll affect all skins). That would cause the button to take on the styling on all pages of all skins. If instead you want to do it on specific pages, you can use inline styling (see Timeshifter's link).

(Sorry about the delay, I wasn't looking at the forum after I responded, and then I lost the talk page message...) --Joey (talk) 16:54, March 7, 2010 (UTC)


 * Awesome, that works! I'll try to understand Timeshifter's stuff if I want to specific page. Thanks. Klow 00:39, March 8, 2010 (UTC)


 * There is more info here:
 * w:c:dev:ShowHide
 * Help:Dynamic navigation
 * --Timeshifter 09:40, March 8, 2010 (UTC)