HTML-Contents
Creates a table of contents in a DOM element optionally linked to with anchors. No dependencies.
Get It
We're on npm:
npm i html-contents
Download from GitHub: https://github.com/psalmody/html-contents
Use It
No jQuery needed. Just include this script:
And call like this.
Optionally put some options in there:
//these are the defaultsdocument
See It
You can run gulp
and localhost:3000
to see a working example (it's also in test/index.html
)