gfranko / jquery.tocify.js

A jQuery Table of Contents plugin that can be themed with Twitter Bootstrap or jQueryUI.
http://gregfranko.com/jquery.tocify.js/
MIT License
927 stars 217 forks source link

Feature request: Setting the page's fragment identifier automatically #41

Closed lord closed 11 years ago

lord commented 11 years ago

Right now, when you scroll, the stuff after the # in the page's header doesn't change. It only changes when you click on a link in the ToC.

The option to set that automatically as you scroll would be a really nice feature — that way, on a long document, users can just copy the URL for that exact part of the page without worrying about clicking on the ToC first.

Awesome plugin by the way! Loving it!

gfranko commented 11 years ago

Great suggestion. I just released Tocify v1.8.0, which added the scrollHistory option. You can use this feature by doing this:

$('#toc').tocify({
  scrollHistory: true
});
lord commented 11 years ago

Sweet, thanks!