Note: I haven't had time to maintain this repository for the last few years, so if anyone would like a particular fix just send me a tip via Paypal ([email protected]) and I'll look into it
A jQuery plugin that dynamically generates a table of contents. Tocify can be optionally styled with Twitter Bootstrap or jQueryUI Themeroller, and optionally animated with jQuery show/hide effects. Tocify also optionally provides support for smooth scrolling, scroll highlighting, scroll page extending, and forward and back button support.
Themeable with Twitter Bootstrap or jQueryUI Themeroller
Supports dynamic scroll and click jQuery show/hide effects
Supports forward and back button support
Supports smooth scrolling animations
Supports dynamic scroll highlighting
Supports a page extender option to make sure a page is big enough to scroll to all table of content items
Passes jsHint with no errors
##Requirements
jQuery 1.7.2+
jQueryUI Widget Factory 1.8.21+
##Browser Support
IE7+, Firefox 4+, Chrome, Safari 4+, and Opera 11+
##Unit Tests
All unit tests are written using the Jasmine Framework (Work in Progress)
##Contributing
Take care to maintain the existing coding style. Add Jasmine unit tests for any new or changed functionality. Lint and test your code using grunt.
If you plan to contribute to Tocify in the future, keep in mind that you should make sure your code passes the Grunt checks. If you are on Windows (like me) remember you need to run the grunt command using grunt.cmd. Also, if you have trouble getting the Jasmine Unit Tests to work with PhantomJS 1.5 (the current release), install PhantomJS 1.3.
After you have verified your code, send a pull request to the Tocify dev branch. After you send a pull request, you will hear back from me shortly after I review your code.
You'll find source code in the "src" subdirectory!
##Forking
If you find that you need a feature that Tocify does not currently support, either let me know via the Tocify issue tracker, or fork Tocify on Github and easily extend it to create your own widget!
请发表评论