Talk:Collapsing
this wiki
Back to page
Contents
[show] table with some rows collapse
Edit
Hai there, is there a method to create a table and set some rows are collapsible and the rest are not ?
in the previous version , i can use this
some rows are collapsible
{| class="wikitable collapsible"
!colspan="2"| Title
|- class="nocollapse"
| Column 1 || Column 2
|- class="nocollapse"
| abc || def
|-
| 123 || 765
|-
| xyz || 123
|- class="nocollapse"
| pqr || 987
|-
|}
by WieQuadrat (talk) 18:17, September 4, 2012 (UTC)
- This can be realised with a custom toggle.
- wiki markup
{| class="wikitable"
!colspan="2"| Title <span class="mw-customtoggle-test wikia-menu-button">[+/-]</span>
|-
| Column 1 || Column 2
|-
| abc || def
|- id="mw-customcollapsible-test" class="mw-collapsible"
| 123 || 765
|- id="mw-customcollapsible-test" class="mw-collapsible"
| xyz || 123
|-
| pqr || 987
|}
- result
Title Column 1 Column 2 abc def 123 765 xyz 123 pqr 987
Change the color of the expand-collapse link
Edit
How can I change the color of the expand-collapse link text? I want to do this here I assume:
I want the problem solved without inline CSS.
See the problem here:
Also, how can I add a couple nonbreaking spaces in front of the expand-collapse link? I want this problem also solved without inline CSS. --Timeshifter (talk) 19:13, March 14, 2013 (UTC)
Jquery Sliding
Edit
Is it possible to use the Jquery Effect .slideToggle() instead of using a fader for collapsing?
--Echoblast53 (talk | contributions | chat) 00:49, April 3, 2013 (UTC)
- No, not with this built in collapsing feature. You would need to write your own custom collapsing JS separate from this one, as this does not support an end-user option for changing the animation. (Perhaps you could request such a feature as a support request at Special:Contact so that Wikia can possibly feed your suggestions upstream to the MediaWiki folks.)
- Also, the author noted in the $.makeCollapsible source code that sliding does not appear to work properly with tables, so you might want to be careful about that. (CTRL + F, search for "action" to locate the part of the code that collapses the elements.)
Mathmagician ƒ(♫) 02:43 UTC, Wednesday, 3 April 2013
Place link in another part of a table
Edit
| Foo title | |
|---|---|
| a | 1 |
| b | 2 |
| I want the link next to this text | |
| I want this cell to collapse | |
—This unsigned comment is by FortressMaximus (wall • contribs) . Please sign your posts with ~~~~!
- Try one of these two possibilities.
| Foo title | |
|---|---|
| a | 1 |
| b | 2 |
| I want the link next to this text [Expand/Collapse] | |
| This cell collapses. Note that the downside to this approach is that the custom toggler can't alternate between "Expand" and "Collapse", so it will look a bit different. | |
| Foo title | |
|---|---|
| a | 1 |
| b | 2 |
| I want the link next to this text This text collapses. Note that the class="mw-collapsible-content" element needs to be a child node of the class="mw-collapsible" node. Meaning that you can't have them be in separate table cells if you do it this way. | |
- Both are documented on the help page.
Mathmagician ƒ(♫) 02:43 UTC, Wednesday, 3 April 2013
- Can I do multiple collapsible cells?
| Foo title | |
|---|---|
| a | 1 |
| b | 2 |
| I want the link next to this text How do I get this in its own cell, because it's formatted like a header cell not a data cell | |
| I want the link next to this text I've tried doing it with multiple cells but these conflict | |
--FortressMaximus (talk) 15:23, April 5, 2013 (UTC)
- I think I can do create changing toggle text when it's not in the header cells by combining two tables, I'll try doing this by css.FortressMaximus (talk) 16:36, April 5, 2013 (UTC)
| Foo title | |||
|---|---|---|---|
| a | 1 | ||
| b | 2 | ||
| |||
- This is a table within a table, with some styling tweaks. Will this work for you? ǝsʞpɐןǝ (message wall) 16:42, 5 April 2013
- It works but the cell that collapses can't be formated as a data cell, instead it's behaves as another header cell. http://macross.wikia.com/wiki/Template:Infobox/Mecha, the cell is at the bottom and this is the custom table class I made http://macross.wikia.com/wiki/MediaWiki:Wikia.css and an example of the problem http://macross.wikia.com/wiki/VF-11_Thunderbolt#Technology_.26_Combat_Characteristics
- Nevermind! Fixed it, the cell i placed the internal table in was a header cell so wiki assume the same formatting in the interntal table's data cell, thank you very much guys!FortressMaximus (talk) 17:24, April 5, 2013 (UTC)
Wikia
Edit
Does this not work when using the "Wikia" layout? I've been scratching my head over why I could never get it to work using that layout before noticing that this code seems to work fine when I switch over to Monobook. Is there someway to make it work on the Wikia layout too? Siberian99 (talk) 04:54, January 31, 2014 (UTC)
- It should work under Wikia, and honestly you're unlikely to find something that works on Monobook that doesn't work on Wikia.
- Could you give a link to a page showing this trouble? Thisismyrofl (talk) 05:42, January 31, 2014 (UTC)
- I am sorry, I am an idiot. It does work, it just does not show up during edit preview so I frustrated myself over it when all I had to do was click publish! Thank you for the help. --Siberian99 (talk) 06:18, January 31, 2014 (UTC)