Closed ghost closed 10 years ago
Yep, that's on the feature list.
I have related suggestion. It is similar enough that I did not start a new issues.
It would be great if the hash tag was generated by a function. The hash tag generator would have a default specified e.g
jQuery.fn.toc.defaults = {
...
hashtag: function(i, heading, prefix){
return '#'+prefix+i;
},
...
};
and could be called with $.opts.hashtag(i,heading, $.opts.prefix)
.
I will fork the project and implement this feature. I will also provide an implementation which returns the heading text as an example.
fixed in #36
On your example page, if you click the "Contributors" link in the table of contents, instead of the url hash being #toc9, it would be cleaner and make more sense for a url if the headline was the hash. Just a suggestion.