Create a little link to toggle a ToC


With a single call, create a little (hide/show) button like above. It's simple:

<script>
widget.toggleToc(startHidden);
</script>

startHidden is an optional parameter set to true if you want to start with a collapsed ToC and false to start with the ToC expanded. It will default to false if called with no parameter (just widget.toggleToc() ).

The link created is of class "tocTitle", so you can also style it as you wish:

<style> .tocTitle { ...some CSS declarations here... } </style>



Page Information

  • 1 year ago [history]
  • View page source
  • You're not logged in
  • Spam-like content was removed from this page.
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts