Plugin to add a table of contents to a page using jQuery, featuring:
The following returns an unordered list that you can then add to your page:
$.toc('#content h1, h2, h3.foo');