nowfound

Life & fun · May 11, 2016

TC

Tocbot – Create a table of contents based on the html heading structure

Tocbot - Generate a table of contents based on the heading structure of an html document

Tocbot – Create a table of contents based on the html heading structure launched on May 11, 2016 with 7 votes and more than 50% of that year's launches. The site was still online in September 2026, 10 years on.

What it does

Tocbot builds a table of contents (TOC) from headings in an HTML document. This is useful for documentation websites or long markdown pages because it makes them easier to navigate. This library was inspired by Tocify , the main difference is that Tocbot uses native DOM methods and avoids the jQuery & jQuery UI dependencies. You can use npm to install it or include the script on the page with HTML. Include the script at the bottom of the page before the closing body tag. CSS is used for expanding & collapsing groupings and some basic styling. Initialize the script at the bottom of the page before the closing body tag. NOTE: Make sure the body is scrollable and the document headings have id…from tscanlin.github.io

Does a similar job

all alternatives →

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, May 2016

the whole month →
  • Google Search, GIFs, emojis & more—right from your keyboard

    Life & fun · 2016 · apps.apple.com

  • Your hands are the only interface you'll need

    Work · 2016 · google.com

  • Copper▲818

    Password-free signups. No social network required.

    Dev tools · 2016

  • Firebase▲804

    App success made simple by google

    Dev tools · 2016 · firebase.google.com

  • Buy cool things you discover on Product Hunt 😄 📦

    Commerce · 2016

  • A new look for Instagram

    Life & fun · 2016 · about.instagram.com