jQuery Plugin For Tooltip-style Table Of Contents - scrollTip

jQuery Plugin For Tooltip-style Table Of Contents - scrollTip
File Size: 5.29 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

scrollTip is a lightweight jQuery plugin that generates a tooltip-style table of contents next to the scrollbar to indicate your position on the page as you scroll.

How to use it:

1. Load the jQuery scrollTip plugin after jQuery library but before the closing body tag.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="jquery.scrolltip.js"></script>

2. Generates a table of contents from heading tags.

jQuery("h1, h2, h3").scrollTip();

3. Default options.

jQuery("h1, h2, h3").scrollTip({

  // Target container
  scrollbar : 'body',

  // How long it takes to fade in/out
  fadeDuration : 600,

  // How long to show the tooltip before hiding it again
  sleepDuration : 1000,
  
});

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