5 <meta http-equiv="X-UA-Compatible" content="chrome=1">
6 <title>Tocify by gfranko</title>
7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
12 <div class="toc-title">
14 <p>A jQueryUI Table of Contents Plugin</p>
15 <div id="switcher" align="center"></div>
18 <div class="documentation well">
22 <div class="github-widget" data-repo="gfranko/jquery.tocify.js"></div>
24 <h3>Notable Features</h3>
26 <p>Supports <span class="headerDoc">HTML5 History pushstate API</span> (via History.js) for forward and back button support</p>
28 <p>Supports styling with <span class="headerDoc">jQueryUI Themeroller</span></p>
30 <p>Supports show/hide animations with <span class="headerDoc">jQuery effects</span></p>
32 <p>Supports <span class="headerDoc">smooth scrolling animations</span>
35 <p>Supports <span class="headerDoc">dynamic scroll highlighting</span></p>
37 <p>Supports <span class="headerDoc">dynamic scroll show/hide effects</span></p>
39 <p>Supports <span class="headerDoc">page extender</span> option to make sure a page is big enough to scroll to all table of content items</p>
43 <h4>jQuery 1.7.2+</h4>
44 <p>The latest version of jQuery is always recommended</p>
46 <h4>jQueryUI Widget Factory 1.8.20+</h4>
47 <p>The latest version of the jQueryUI Widget Factory is always recommended</p>
49 <h1>Optional Dependencies</h1>
52 <p>History.js is required if you want forward and back button support.
54 Note: If you do not include History.js, then Tocify will not have history support, but it will still be functional.
57 <h1 class="getting-started-test-marker">Getting Started</h1>
61 <p>Download the latest versions of...</p>
62 1. <a href="http://www.jquery.com" target="_blank">jQuery</a>
64 2. <a href="http://jqueryui.com/download" target="_blank">jQueryUI Widget Factory</a> (You only need the Widget component underneath the UI Core dependency)
66 3. <a href="https://github.com/balupton/History.js/" target="_blank">History.js</a> (If you want forward and back button support)
72 <p>The container element that holds all of the elements used to generate the table of contents.</p>
74 <p>Accepts String: Any jQuery selector</p>
77 <p>context: "body"</p>
80 <p>The element's used to generate the table of contents. The order is very important since it will determine the table of content's nesting structure</p>
82 <p>Accepts a String Array: Each string must be a valid jQuery selector</p>
85 <p>selectors: ["h1"]</p>
88 <p>Used to display any of the table of contents nested items</p>
90 <p>Accepts String: "none", "fadeIn", "show", "slideDown", or any of the jQueryUI show effects (i.e. "bounce")</p>
93 <p>showEffect: "slideDown"</p>
95 <h3>showEffectSpeed</h3>
96 <p>The time duration of the show animation</p>
98 <p>Accepts Number (milliseconds) or String: "slow", "medium", or "fast"</p>
101 <p>showEffectSpeed: "medium"</p>
104 <p>Used to hide any of the table of contents nested items</p>
106 <p>Accepts String: "none", "fadeOut", "hide", "slideUp", or any of the jQueryUI hide effects (i.e. "explode")</p>
109 <p>hideEffect: "slideUp"</p>
111 <h3>hideEffectSpeed</h3>
112 <p>The time duration of the hide animation</p>
114 <p>Accepts Number (milliseconds) or String: "slow", "medium", or "fast"</p>
117 <p>hideEffectSpeed: "medium"</p>
119 <h3>smoothScroll</h3>
120 <p>Animates the page scroll when specific table of content items are clicked and the page moves up or down</p>
122 <p>Accepts a boolean: true or false</p>
125 <p>smoothScroll: true</p>
127 <h3>smoothScrollSpeed</h3>
128 <p>The time duration of the smoothScroll animation</p>
130 <p>Accepts Number (milliseconds) or String: "slow", "medium", or "fast"</p>
133 <p>smoothScrollSpeed: "medium"</p>
135 <h3>showAndHideOnScroll</h3>
137 <p>Determines if table of content nested items should be shown and hidden while a user scrolls the page</p>
139 <p>Accepts a boolean: true or false</p>
143 <p>showAndHideOnScroll: true</p>
145 <h3>highlightOnScroll</h3>
147 <p>Determines if table of content nested items should be highlighted (set to a different background color to show it is the currently active item) while scrolling</p>
149 <p>Accepts a boolean: true or false</p>
153 <p>highlightOnScroll: true</p>
156 <h3>highlightOffset</h3>
158 <p>The offset distance in pixels to trigger the next active table of contents item</p>
160 <p>Accepts a number</p>
164 <p>highlightOffset: 40</p>
169 <p>Determines if jqueryUI or regular CSS classes will be added to the table of contents</p>
171 <p>Accepts a boolean: true or false</p>
175 <p>jqueryUI: true</p>
180 <p>If a user scrolls to the bottom of the page and the page is not tall enough to scroll to the last table of contents item, then the page height is increased</p>
182 <p>Accepts a boolean: true or false</p>
186 <p>extendPage: true</p>