The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
Flexible, nested table of contents
Plugin to add a table of contents to a page using jQuery, featuring:
- the ability to select via selectors exactly which elements would be included (i.e., #content h2 instead of just h2)
- the ability to nest the lists of sections to reflect the hierarchy of the page
The following returns an unordered list that you can then add to your page:
$.toc('#content h1, h2, h3.foo');
Downloads
Resources
Development
(3 votes)
