Karl Wick saith:
Here is a technical question: in the same way that the table of contents feature can be opened and collapsed with a click apparently wihout reloading the whole page (which IMHO is a very cool feature !), could we have collapseable notes for the edge of a document ?
We can easily use the same (or almost the same) code for hiding/showing sidenotes as we already do for hiding/showing the table of contents. I made a sample at
http://www.wikipedia.org/upload/a/a2/Sidenote.html
with JavaScript code based on the wikibits.js ToC code. The changes are to allow the ToC/note functions to operate on any ID, not tocinside, and for the default to be hidden notes. (Hmm...one could add another feature that allows selectable default...another parameter...and then showTocToggle(...) could be showNoteToggle(..., 'tocinside', true)...)
The code requires a simple one-row floating table, with one cell being display: hidden and having an ID, and the other cell calling showNoteToggle() instead of showTocToggle() with parameters "Show", "Hide", and the first cell's ID. I'm sure if one really wanted that one could use a floating div within a floating div so the [hide] link looks like a section [edit] link and doesn't take up vertical space.
How to put this in Wikipedia code: maybe use a <sidenote> tag. <sidenote id="x">text</sidenote> expands to <table class="sidenote"> <tr> <td id="x" style="display: none; width: 300px;">text</td> <td><script>showTocToggle('Show', 'Hide', 'x'</script></td> </tr></table>. I don't know PHP, else I would have helped add this to the Wikipedia source.
The sample page has been tested in Mozilla 1.4 and Internet Explorer 6.0. It fails in Opera 6.0 - but so does the ToC.
===== -Geoffrey Thomas geoffreyerffoeg@yahoo.com
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com