by vietmusic
You know how Wikipedia has a collapsible table of contents? We can do something similar with a little ingenuity and some javascript. Just paste this in wherever your <toc> usually is:
<script language="javascript"> function toggleTOC() { if (document.getElementById("mytoc").style.display!="none") document.getElementById("mytoc").style.display="none"; else document.getElementById("mytoc").style.display="block"; } </script> <a href="javascript:toggleTOC()">**Toggle Contents**</a><div id="mytoc" style="margin-top:-15px"><toc></div>
If you want neater code, put the stuff between <script></script> at the bottom of your page.
Now you'll have a link above your <toc> that allows you to turn it on and off.
There's an option that's even slicker...go to page 2