Table of Contents generator for anchors with MooTools
Saturday, May 3rd, 2008For those pages with loads of text a table of contents would be nice, with anchors located in relevant sections. Thing is that going through a page with thousands of words and headings is no fun at all.
I made a script using the lovely MooTools that gets all the elements with a given CSS selector (using the Elements.Selectors syntax) and then builds an unordered list of links, with the element text as the title, and an anchor placed in that element. (more…)
