最近の検索


最近の検索はありません

Nicholas Smolney's Avatar

Nicholas Smolney

参加日2021年4月15日

·

前回のアクティビティ2021年10月27日

フォロー中

0

フォロワー

0

合計アクティビティ

5

投票

0

受信登録

3

アクティビティの概要

さんの最近のアクティビティ Nicholas Smolney

Nicholas Smolneyさんがコメントを作成しました:

コミュニティのコメント Discussion - Tips and best practices from the community

and if anyone else is interested, I made a small addition to my css file to indent for subsequent levels

 

.toc ul{
padding-left: 20px;
}

コメントを表示 · 投稿日時:2018年5月25日 · Nicholas Smolney

0

フォロワー

0

投票

0

コメント


Nicholas Smolneyさんがコメントを作成しました:

コミュニティのコメント Discussion - Tips and best practices from the community

Hey Dave, see below for how I addressed this:

Basically the code didn't account for the case when your next heading is going back a level (current_level < previous_level), so I added that case and added an array to keep track of the previous levels.

/*** Table of contents code ***/
var $headers = $('.article-body h1');

if ($headers.length > 0) {
var $toc = $('

');
var $firstUl = $('

コメントを表示 · 投稿日時:2018年5月25日 · Nicholas Smolney

0

フォロワー

0

投票

0

コメント