Get new jQuery plugins just once a week
January 13, 2014
toc-js | A jQuery plugin for generating table of contents
toc-js is a jQuery plugin for generating table of contents based on headings with support for nested list elements.
It has got the following features :-
- Allow to define different format for each heading level.
- Generate anchor link for heading.
- Automatically scroll to with the help of Bootstrap ScrollSpy plugin.
- The table of contents are generated using nested
- Easy to customize look and feel.
It also provides the following options :-
selector : Indicates which elements will be found and included in the table of contents.
elementClass : The CSS class which will be added to root element.
rootUlClass : The CSS class which will be added to the root generated ul element.
ulClass : The CSS class which will be added to all generated ul elements (including the root and sub ones).
prefixLinkClass : This option will be added as a prefix to CSS class of all generated a elements. The suffix is level of associating heading (1 to 6).
heading : The Table of Contents heading label placed at the top. This heading is not shown by default.
indexingFormats : Define the indexing formats for each heading level.
Created by Phuoc Nguyen
table of contents
Sign up for our weekly newsletter.
10 Most Amazing Couple Gifts
A comprehensive guide to couple gift Ideas for Valentine’s Day, Weddings, Anniversaries for your spouse, friend, fiance, boyfriend / girlfriend.
Take me there !
Continue to jquer.in