In-page collapsable table of contents?
-
Hello, I’m trying to make a sort of wiki on my site and am having some trouble getting a collapsable table of contents. I’ve got a template all set and am quite happy with the way my contents box looks – but all attempts I have made to get the thing to expand/collapse on a toggle have failed.
https://wp.ignoland.com/?page_id=46
I use a plugin that can add custom per-page CSS and javascript, and while the CSS function works perfectly, I’ve yet to plug in any working javascript I’ve found…the only pure CSS solution I found to have a toggle was the ‘checkbox hack’ (https://css-tricks.com/the-checkbox-hack/) but attempting that broke the layout of the page (I assume because it hides the checkbox offscreen and WP couldn’t process that?). Is there any method I can use to create a ‘show/hide’ link inside my existing contents box, ala Wikipedia? I want text to continue to be able to wrap around the infobox/contents box areas whether the contents is shown or hidden. Worst case scenario I’ll just suck it up and deal with a non-hidable contents…but ideally I’d like to be able to make it toggle.
- The topic ‘In-page collapsable table of contents?’ is closed to new replies.