Automatic Table Of Contents Plugin with jQuery sdscrollmenu - Download Automatic Table Of Contents Plugin with jQuery - sdscrollmenu

Download Automatic Table Of Contents Plugin with jQuery – sdscrollmenu

Posted on

This time I will share jQuery Plugin and tutorial about Automatic Table Of Contents Plugin with jQuery – sdscrollmenu, hope it will help you in programming stack.

Automatic Table Of Contents Plugin with jQuery sdscrollmenu - Download Automatic Table Of Contents Plugin with jQuery - sdscrollmenu
File Size: 6.16 KB
Views Total: 845
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

sdscrollmenu is a lightweight jQuery table of contents plugin for automatically generating a sticky side navigation from heading tags that features smooth scroll, title / link highlighting, scroll spy and responsive layout.

How to use it:

1. Load jQuery library and the jQuery sdscrollmenu plugin at the end of the document.

1 <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
2 <script src="jquery.sd<a href="https://www.jqueryscript.net/tags.php?/Scroll/">Scroll</a><a href="https://www.jqueryscript.net/menu/">Menu</a>.js"></script>

2. Call the plugin to generate a sticky table of contents from heading tags within the container ‘target’.

1 $('#target').sdScrollMenu({
2   /* OPTIONS HERE /*
3 });

3. Config the table of contents.

01 $('#target').sdScrollMenu({
02  
03   // width of the table of contents
04   width: 150,
05  
06   // scroll speed
07   scrollDuration: 500,
08  
09   // heading tags
10   titles: 'h1, h2, h3, h4, h5, h6',
11  
12   // highlight duration
13   highlightDuration: 1000,
14  
15   // highlight color
16   highlightColor: '#146'
17  
18 });

This awesome jQuery plugin is developed by stevedavid. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net