A JavaScript application that dynamically generates a table of contents (TOC) for the HTML containing amendments or similar structured headings. The program scans the HTML for specific heading tags, creates anchors for navigation, and appends these links to a TOC for seamless browsing.
- Dynamic Table of Contents:
- Automatically detects all
H2headings in the HTML. - Creates clickable links in a table of contents that navigate to the respective sections.
- Automatically detects all
- Anchor Integration:
- Adds named anchors to each heading for smooth scrolling when links are clicked.
- Scalable:
- Works dynamically with any number of headings in the source document.
- HTML: Provides the structure of the document and headings.
- CSS: Styles the table of contents and headings for better user experience.
- JavaScript: Core logic for generating the TOC and managing navigation.
- Open the amendmentsTOC_txt.html file in a web browser.
- The table of contents will appear on the page, dynamically linked to the headings in the document.
This program was developed as part of an assignment for my programming class. The folder names and structure reflect the required naming convention for class submissions.