Clean up whitespace issues, only (FINERACT-1188)
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
|
||||
0.1.2 / 2013-04-08
|
||||
0.1.2 / 2013-04-08
|
||||
==================
|
||||
|
||||
* optimized scroll function. fixes #15
|
||||
* migrated to grunt for building
|
||||
* fixed tabs on docs/index
|
||||
|
||||
0.1.1 / 2012-10-05
|
||||
0.1.1 / 2012-10-05
|
||||
==================
|
||||
|
||||
* updated example
|
||||
* code cleanup, fixed onHighlight, removed console.log
|
||||
* Add headerText and itemClass options
|
||||
|
||||
0.1.0 / 2012-07-05
|
||||
0.1.0 / 2012-07-05
|
||||
==================
|
||||
|
||||
* added smoosh to Makefile
|
||||
@@ -24,7 +24,7 @@
|
||||
* adds another option to customize the header link text
|
||||
* updated site
|
||||
|
||||
0.0.3 / 2012-04-06
|
||||
0.0.3 / 2012-04-06
|
||||
==================
|
||||
|
||||
* fixed smooth scrolling in firefox
|
||||
@@ -37,7 +37,7 @@
|
||||
* updated site
|
||||
* 0.0.2 - updated docs
|
||||
|
||||
0.0.1 / 2012-02-25
|
||||
0.0.1 / 2012-02-25
|
||||
==================
|
||||
|
||||
* updated docs/site
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#TOC
|
||||
|
||||
[TOC](http://projects.jga.me/toc/) is a jQuery plugin for automatically generating a table of contents.
|
||||
[TOC](http://projects.jga.me/toc/) is a jQuery plugin for automatically generating a table of contents.
|
||||
|
||||
For more information, check out the [documentation](http://projects.jga.me/toc/).
|
||||
|
||||
@@ -17,75 +17,75 @@ TOC is a jQuery plugin that will automatically generate a table of contents for
|
||||
|
||||
##Usage
|
||||
|
||||
`javascript
|
||||
$('#toc').toc();
|
||||
`javascript
|
||||
$('#toc').toc();
|
||||
|
||||
###Options
|
||||
Defaults shown below
|
||||
|
||||
`javascript
|
||||
$('#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();
|
||||
},
|
||||
'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
|
||||
return $heading[0].tagName.toLowerCase();
|
||||
}
|
||||
});
|
||||
`javascript
|
||||
$('#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();
|
||||
},
|
||||
'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
|
||||
return $heading[0].tagName.toLowerCase();
|
||||
}
|
||||
});
|
||||
|
||||
##Example CSS
|
||||
|
||||
`css
|
||||
#toc {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
background: #333;
|
||||
box-shadow: inset -5px 0 5px 0px #000;
|
||||
width: 150px;
|
||||
padding-top: 20px;
|
||||
color: #fff;
|
||||
}
|
||||
`css
|
||||
#toc {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
background: #333;
|
||||
box-shadow: inset -5px 0 5px 0px #000;
|
||||
width: 150px;
|
||||
padding-top: 20px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#toc ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
#toc ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#toc li {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
#toc li {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
#toc a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
#toc a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#toc .toc-h2 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
#toc .toc-h2 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#toc .toc-h3 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
#toc .toc-h3 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
#toc .toc-active {
|
||||
background: #336699;
|
||||
box-shadow: inset -5px 0px 10px -5px #000;
|
||||
}
|
||||
#toc .toc-active {
|
||||
background: #336699;
|
||||
box-shadow: inset -5px 0px 10px -5px #000;
|
||||
}
|
||||
|
||||
##History
|
||||
|
||||
|
||||
Reference in New Issue
Block a user