Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 862 Bytes

README.md

File metadata and controls

21 lines (19 loc) · 862 Bytes

autoToc.js

jQuery plug-in to auto generate Table of Contents based on the h2 headings available in the article tag of HTML document.

Features

  • Smooth scrolling between sections.
  • Fully customizable with CSS.
  • Lite weight file size.
  • Simple and clean logic.
  • User friendly and Easy to implement.

How to Use

Just call the autoToc() in your jQuery code, use the HTML selector, where Table of Contents to be inserted. For example, if you want to append this TOC in the beginning of your article, the statement will be:

 $("article").autoToc(); 

Similarly, you can insert this autoToc anywhere, i.e in the sidebar , or your desired location.
No need any extra tag, coding or anything more...