Forum:Toggling visibility of tables and other page elements
From Uncyclopedia, the content-free encyclopedia.
Apparently, over at Wikipedia they have this fancy "NavFrame" class in their Monobook.js and Monobook.css that allows for "collapsing" table headers. I happen to think are rather neat-o, so...
How much trouble would it be to bring something like that over here? Or just to allow for any sort of toggling of an HTML element's visibility attribute whatsoever?
To wit, in an ordinary HTML page I can toggle an element's visibility with a simple piece of inline JavaScript code, like so:
<table id="hideyho" style="visibility:hidden;"><tr><td>This is highly informative!</td></tr></table>
<code><div id="togglerthingy" onclick='javascript: if (document.getElementById("hideyho").style.visibility == "hidden") {document.getElementById("hideyho").style.visibility = "visible"} else {document.getElementById("hideyho").style.visibility = "hidden"};'>Click here for more information!</div>
But since the WikiML parser removes all event handlers, that's not possible here, at least not without admin intervention. I can think of quite a lot of uses for something like this, and most of them would actually be less annoying than the already-overused {{USERNAME}} template.
Anyway, it's just a suggestion! Thanks, c • > • cunwapquc? 14:47, 5 November 2006 (UTC)
- It wouldn't be much trouble at all, as far as I can see, and I think it'd be kind of nice to have that option, I know alot of Wikipedians use the show/hide button on their userpages because theyre so freaking big, and I'm sure there's some other uses too... :)
t o m p k i n s blah. ﺞوﻦ וףה ՃՄ ண்ஸ ފއހ วอฏม +տ trade websites 17:42, 5 November 2006 (UTC)
- It sounds like a good idea, but though I haven't checked that link out properly, would it be worth investigating whether it's possible to use the TOC's show/hide method in a div/span other than the TOC? I'll check out this so-called NavBox though, sounds like a good idea. I tried implementing pure CSS popups on mediawiki before, but it turns out you can't use inline CSS to do it, and therefore would require modification of user of site CSS, and therefore isn't that useful. If someone could find a way to do it using inline CSS, that would mean modification of site css/js wouldn't be necessary. • Spang • ☃ • talk • 05:52, 6 November 2006 (UTC)
- I have now rigorously tested this navbox contraption for several seconds, and can conclude that it is not half bad. Also doesn't suck when javascript is turned off. I'll wait for more opinions before implementing it though (if they come at all; there's generally a lot of apathy about such technical stuff). • Spang • ☃ • talk • 12:41, 6 November 2006 (UTC)
- Make it so </picard>--The Right Honourable Maj Sir Elvis UmP KUN FIC MDA VFH Bur. CM and bars UGM F@H (Petition) 14:19, 6 November 2006 (UTC)
Done. I had totally forgot about this, but it's done now. Observe it in action below. I have no idea how to make it work though, so you'll have to work that out yourself. • Spang • ☃ • talk • 16:20, 26 Nov 2006
| Soviet and post-Soviet armoured fighting vehicles after World War II | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| List of armoured fighting vehicles by country | ||||||||


