A Table of Contents (TOC) at the top of your document can be useful should your document have a lot of content divided by headers. The combination of using a jQuery snippet and wrapping the headers in h2 and/or h3 containers will turn the headers into links at the top of your document. The content will then become easily accessible by clicking on a link. This document will show you how to make a TOC of your very own.
<div id="kb-doc-TOC"></div>
This is what it should look like on your screen.
<script src="/cssjs/libs/jquery/1.8.2/jquery.min.js"></script> <script src="/cssjs/libs/jquery/1.8.2/jquery.toc.min.js"></script> <script type="text/javascript"> /* Specify elements to be used as TOC heading */ $('#kb-doc-TOC').toc({'selectors': 'h2,h3',}); </script>
This is what it should look like on your screen. Modify the h2,h3
below to suit your document.
You can see the table of contents in action in this document.
Sample Doc: How To Remove Coffee Stains From Your Clothes