jquery.toc.jsを使って本文の見出し(h2~h4)を目次にして表示するプラグインをご紹介します。 ブログサイトで使えそうなjsプラグインです。 jquery.toc.jsを使って本文の見出しを目次表示するCSS記述 ※目次表示箇所「#toc」と本文エリア「class=”container”」のCSS記述です。必要に応じて変更して下さい。 <style> body { font-size: 16px; } h1{ text-align: center; font-size: 20px; line-height: 1.6em; padding: 20px 0; } p{ padding-bottom: 20px; } #toc { background: #fefefe; width: 240px; position: fixed; border: 1px solid #ddd; c
![jquery.toc.jsを使って本文の見出しを目次表示するプラグイン|DAD UNION – エンジニア同盟](https://cdn-ak-scissors.b.st-hatena.com/image/square/7652f53636a7bd292e7a2f26797b78df18980110/height=288;version=1;width=512/https%3A%2F%2Fdad-union.com%2Fwp-content%2Fuploads%2F2023%2F08%2Fpic20230821.jpg)