CodeHimBlog / autoToc.js

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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...

About

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

License:MIT License


Languages

Language:JavaScript 100.0%