TOC control detects all header tags on a page and creates a ToC in a designated, desired section.
Clicking one of the header links will make the viewport jump to the appropriate header position.
TOC also adds ordering numbers in front of the ToC elements.
If the user has turned his JS off, the table of content gracefully degrades without breaking the layout of the page.
A jQuery version of this library is also available.
Requirements:
· JavaScript enabled on client side
What's New in This Release: [ read full changelog ]
· Binds toc function to Document's DOMContentLoaded event instead of Window's load event.
· Rollbacks querySelectorAll changes from version 1.4 to maintain compatibility with IE < 9.