jQuery Table of Contents Plugin - Tocify

File Size: 259 KB
Views Total: 5432
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Table of Contents Plugin - Tocify

Tocify is a jQuery Plugin for creating a table of of contents that provides support for smooth scrolling, scroll highlighting, scroll page extending, and forward and back button support. The plugin can be themed with Twitter Bootstrap or jQuery UI.

How to use it:

1. Include jQuery and CSS Files

<!-- CSS files -->
<link rel="stylesheet" type="text/css" href="jquery.tocify.css">
<link type="text/css" rel="stylesheet" href="bootstrap.css" />
 
<!-- Js Files -->
<script type="text/javascript" src="jquery-1.5.xx.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script type="text/javascript" src="jquery.tocify.min.js"></script>

2. Markup

<div id="toc"></div>

3. Call the plugin

<script type="text/javascript">
$(document).ready(function() {
  //Calls the tocify method on your HTML div.
  $("#toc").tocify();
 
  //Call the tocify method with options
  $('#toc').tocify({
    showEffect: "fadeIn"
    scrollTo: 50, 
    smoothScroll: false
  });
});
</script>

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