Build TOC | JavaScriptSource

Build TOC

Stephen Morley Sep 16, 2005
The JavaScript Source: Navigation: Build TOC

This script will automatically build a table of contents based on the header tags found on the Web page. Includes an optional access key [Alt-t] to return to the ToC. Supports DOM standard and works on non-IE browsers.


header 1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore

header 1.1

header 1.1.1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore

header 2

header 2.1

header 2.1.1

header 2.1.1.1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore

header 2.1.1.2

paragraph 4

header 2.1.2

header 2.1.2.1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore

header 3

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore

 

The JavaScript Source: Navigation: Build TOC

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(0 comments)