Show/hide content in posts

Is there a way to do show/hide content in posts. For example:
[+] Section 1 [+] Section 2 ...
Similarly:
[-] Section 1 [-] Section 2 ...
to hide sections.
This will help to make longer posts easier to read by making sections inside such posts.
Thanks.
0
Best Answer
-
422 MVP
You could use , truncate and show hide, toggle whatever, all simple jquery stuff. Search google for jsfiddle slidetoggle
There was an error rendering this rich post.
0
Answers
Try this, it's how everyone else does it: http://vanillaforums.org/addon/spoilers-plugin
@jspautsch
I'm already using this plugin, but it only gives an option to Show, and not Hide. Is that how it works, or am I missing something?
Thanks for your help.
Like after you click Show Spoiler it doesn't allow you to hide it again? That seems odd, I've never used it before though so that could be intentional.
Yeah, that's correct. It has a button to Show, but once the section is expanded, there's no way to hide it again, or at least I couldn't figure out a way to hide it.
The point is you would create a plugin that works in a similar way. A bit of jquery knowledge doesn't hurt.
grep is your friend.
You could use , truncate and show hide, toggle whatever, all simple jquery stuff. Search google for jsfiddle slidetoggle
http://jsfiddle.net/shaneblake/v9WAr/
There was an error rendering this rich post.
For truncation.
http://stackoverflow.com/questions/2248742/jquery-text-truncation-read-more-style
Eg. http://blog.jeremymartin.name/2008/02/jtruncate-in-action.html
There was an error rendering this rich post.
@422
Perfect! Thank you.