Topic on Project:Support desk

Jump to navigation Jump to search

Collapse Header Section

11
87.152.227.19 (talkcontribs)

Hi all,

is there any way, to coallaps the contant beetwen the headers?

I know the solution with div classes "mw-collapsible". But i need the collapse button nearly to the edit button

Like this:


Header 1_______________________________________show edit

Header 2_______________________________________hide edit

This is an example text.

Header 3_______________________________________show edit


thx for your help!

Ciencia Al Poder (talkcontribs)

like this? .

67.166.78.18 (talkcontribs)

That is fantastic! Do you have a link to instructions? thanks!

Ciencia Al Poder (talkcontribs)
Jaroch7 (talkcontribs)

That works great! Thanks for the info & quick reply!

Jaroch7 (talkcontribs)

Is there a way to keep the "Show/hide" from being listed alongside the headers in the Table of Contents?

Ciencia Al Poder (talkcontribs)

No, since it's being part of the header text. A possible workaroud would be to make the entire header text part of the custom toggle. Another option would be to put the custom toggle before the header, and make it float to the right.

Curtiplas (talkcontribs)

One method you could do is to put it after the header, but to then play with the DIV's...


Ex:

User:Curtiplas

Jaroch7 (talkcontribs)

(sorry double post)

108.92.152.130 (talkcontribs)

1) This is great!

2) I'm seeing that if this is used on multiple section all section will show / hide simultaneously instead of just the one selected. Any thoughts?

Ciencia Al Poder (talkcontribs)

That's probably because you use the same class="mw-customtoggle-0" and id="mw-customcollapsible-0". You should use different suffix for each section.

Reply to "Collapse Header Section"