最近搜索


没有最近搜索

Nicolas Galluzzo's Avatar

Nicolas Galluzzo

已加入2021年4月15日

·

最后活动2021年11月01日

关注

0

关注者

0

活动总数

2

投票

0

订阅

1

活动概览

的最新活动 Nicolas Galluzzo

Nicolas Galluzzo 创建了一个帖子,

帖子 Discussion - Tips and best practices from the community

Much like the author of this article, our company needs a way to automatically generate a table of contents for large articles. After finding out we can use jQuery, I put together a script that will automagically create a tiered table of contents based on the Header tags used in the article.

All you need to do is paste the Javascript in this page into the Javascript section of your Articles:

 

Click on the JS tab, then paste in the code at the end:

 

That should do it.. as long as you've used proper heading tags (H1, H2, etc), a Table of Contents will be created any time you load the article.

You can see a live example here: http://codepen.io/ngalluzzo/pen/kXqyVQ?editors=1010

已于 2016年8月18日 发布 · Nicolas Galluzzo

3

关注者

44

投票

55

评论