Skip to content

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

License

Notifications You must be signed in to change notification settings

CodeHimBlog/autoToc.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published