Manual talk:Collapsible elements

Doesn't work?
This didn't work correctly in my Mediawiki 1.12.0 install. Looking at the source code of the page it created, initially hidden content is indeed hidden, but there is no "Show" link to reveal the content. Do you have any ideas? --Gadlen 19:13, 5 June 2008 (UTC)

I'm not seeing the "hide" or "show" links
I'm running 1.13.4. any thoughts, could it be firefox? --69.244.124.138 01:16, 17 March 2009 (UTC)

still doesn't work any thoughts this what is is displayed:
Edited both common.js and common.css This is the header cell, which is always shown This cell is not shown by default.

(no hide or show links)

--69.244.124.138 04:42, 25 March 2009 (UTC)

I composed to the two above messages... any thoughts on how to resolve this and would like to use collapsible tables
Is this code for 13.3 + ? --Mappc 00:00, 5 April 2009 (UTC)

I'm still interested in getting some resolution....any thoughts --Mappc 22:54, 6 April 2009 (UTC)

This does work for me (IE6, Firefox 3 and MediaWiki 13.4)
I had to change the function below the rest stay as it is. --AndreasMueller 21:56, 26 May 2009 (UTC) function createCollapseButtons {   var tableIndex = 0; var NavigationBoxes = new Object; var Tables = getElementsByClassName(document, "table", "collapsible"); for ( var i = 0; i < Tables.length; i++ ) { /* only add button and increment count if there is a header row to work with */ var HeaderRow = Tables[i].getElementsByTagName( "tr" )[0]; if (!HeaderRow) continue; var Header = HeaderRow.getElementsByTagName( "th" )[0]; if (!Header) continue; NavigationBoxes[ tableIndex ] = Tables[i]; Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex ); var Button    = document.createElement( "span" ); var ButtonLink = document.createElement( "a" ); var ButtonText = document.createTextNode( collapseCaption ); Button.className = "collapseButton"; //Styles are declared in Common.css ButtonLink.style.color = Header.style.color; ButtonLink.setAttribute( "id", "collapseButton" + tableIndex ); ButtonLink.setAttribute( "href", "javascript:collapseTable(" + tableIndex + ");" ); ButtonLink.appendChild( ButtonText ); Button.appendChild( document.createTextNode( "[" ) ); Button.appendChild( ButtonLink ); Button.appendChild( document.createTextNode( "]" ) ); Header.insertBefore( Button, Header.childNodes[0] ); tableIndex++; }   var Tables = getElementsByClassName(document, "table", "collapsed"); for ( var i = 0; i < Tables.length; i++ ) { collapseTable( i ); }   var Tables = getElementsByClassName(document, "table", "autocollapse"); for ( var i = 0; i < Tables.length; i++ ) { if ( i >= autoCollapse ) { collapseTable( i ); }    }	}

Worked A-OK
No editing needed over here. Using MediaWiki 1.15.1 with no other custom JS. 74.65.88.219 01:55, 7 October 2009 (UTC)


 * Worked for me too on 1.15.1. At first it was very frustrating, I couldn't get it to work, but all I needed to do was the Shift-Refresh thing in my browser. =D --J.nesta 18:36, 5 November 2009 (UTC)

hide/show placement not working
I updgraded to 1.15.1. Now my hide/show buttons are always on the left even though I have the Common.css file with float right. See at http://sunshinereview.org/index.php/User:Ljarratt

1.16 functionality
Beta 3. This function works flawlessly for me.