Team:Carnegie Mellon/Templates/Footer
From 2012.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<script> | <script> | ||
$('#toc').toc({ | $('#toc').toc({ | ||
+ | 'selectors': 'h1,h2,h3', //elements to use as headings | ||
+ | 'container': 'body', //element to find all selectors in | ||
+ | 'smoothScrolling': true, //enable or disable smooth scrolling on click | ||
+ | 'prefix': 'toc', //prefix for anchor tags and class names | ||
+ | 'onHighlight': function(el) {}, //called when a new section is highlighted | ||
+ | 'highlightOnScroll': true, //add class to heading that is currently in focus | ||
+ | 'highlightOffset': 100, //offset to trigger the next headline | ||
+ | 'anchorName': function(i, heading, prefix) { //custom function for anchor name | ||
+ | return prefix+i; | ||
+ | }, | ||
+ | 'headerText': function(i, heading, $heading) { //custom function building the header-item text | ||
+ | return $heading.text(); | ||
+ | } | ||
}); | }); | ||
</script> | </script> |
Revision as of 16:01, 30 July 2012