I'd love to see [the existing spoiler][1] be enhanced for that. The syntax is:

<pre>&gt;! Spoiler text</pre>

Currently one needs to hover the hidden text to reveal it. That's [sometimes hard][2] on a touch screen ;-) And it shows many blank lines for long spoilers. Like:

>! Moon languages rock!  
>!  
>! From http://en.wiktionary.org/wiki/moon_language  
>! **Noun**  
>! **moon language** (plural **moon languages**)  
>! <ol><li> (*slang*) Text written in an incomprehensible script, especially Japanese or Chinese.</li></ol>  
>! <sub>(Multi-line spoilers need [Markdown double-spaces](http://meta.stackoverflow.com/questions/26011/should-the-markdown-renderer-treat-a-single-line-break-as-br) to get a newline. Automatic lists, headings, et cetera are not supported.)</sub>

For a mockup of collapsing: just copy and paste the following into the location bar. Note that WebKit might complain "Refused to execute a JavaScript script. Source code of script found within request." When seeing that, just change the JavaScript a bit before pasting. Also beware that Chrome might not paste the `javascript:` part, which is needed:

    javascript:$(".spoiler").before("<sub>Click below to show/hide details</sub>").children().hide(); $(".spoiler").click(function(){ $(this).children().toggle(); })

On the other hand: beware that the handling of Markdown within the spoilers [is very limited][3]. One cannot easily change an existing block into a spoiler.


  [1]: http://meta.stackoverflow.com/questions/1191/add-markdown-support-for-hidden-until-you-click-text-aka-spoilers/71396#71396
  [2]: http://meta.stackoverflow.com/questions/75656/cant-see-spoilers-on-touchscreen
  [3]: http://meta.stackoverflow.com/revisions/b5a82ff8-e917-4e8f-9d89-2e2459c82dd5/view-source