User:Coincollector/collapsible table 2: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
</blockquote> | </blockquote> | ||
Using this function is really | Using this function is really, REALLY simpler than the other first I had invented: By just adding said class, the table will turn collapsible, showing a <tt>show/hide</tt> link on the table. When adding the <tt>collapsible</tt> attribute to the table, this will be uncollapsed, collapsing then by clicking in the link. On the other hand, adding <tt>expandable</tt> class, the table will remain collapsed, showing only the header cell when the user have to click the link to show the content. Users can also manipulate what sections can be shown by adding the <tt>expandable</tt> class to the cell's group, while the table is in <tt>collapsible</tt> function. | ||
==Usage== | ==Usage== |
Revision as of 01:08, December 28, 2008
After several days going through, I've finally found a shorter way to make collapsible tables, something that this wiki lacked, while many other wikis that I met so far do have. Credits to the user Poke to find out this alternative for Mediawiki-based sites.
Using this function is really, REALLY simpler than the other first I had invented: By just adding said class, the table will turn collapsible, showing a show/hide link on the table. When adding the collapsible attribute to the table, this will be uncollapsed, collapsing then by clicking in the link. On the other hand, adding expandable class, the table will remain collapsed, showing only the header cell when the user have to click the link to show the content. Users can also manipulate what sections can be shown by adding the expandable class to the cell's group, while the table is in collapsible function.
Usage
Code | Result | |||||
---|---|---|---|---|---|---|
{| class="collapsible" ! Table title |- | Table content |} |
| |||||
{| class="expandable" ! Table title |- | Table content |} |
| |||||
{|class="collapsible" ! Table title |- class="collapsible" ! Subtitle 1 |- | Content 1 |- class="expandable" ! Subtitle 2 |- | Content 2 |} |
|