1.2.4 • Published 4 years ago

js-catalog v1.2.4

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Generate a directory based on the HTML structure without dependencies. and Directory can automatically scroll with content

Demo

npm.io

Use

Vue or other can import ES6 modules.

import Catalog from "js-catalog";
import "js-catalog/lib/style/style.css";

new Catalog({
    contentEl: '#body',
    catalogEl: '#catalog',
    offsetTop: 60         // offset top
})

via script

<script src="/lib/umd/index.js"></script>
<script>
    new Catalog({
        contentEl: '#body',
        catalogEl: '#catalog',
        offsetTop: 60      // offset top
    })
</script>
<div id="body">
  <h1>Chapter 1</h1>
  <p>
    最好表示已经没有上升空间,永远只在一个固定的模式上循环渐进。更好代表着更高层次的境界,举个例子,有人问“你觉得我和某某谁好看
  </p>
  <h2>Chapter 1.1</h2>
  <h1>Chapter 2</h1>
  <p>
    最好表示已经没有上升空间,永远只在一个固定的模式上循环渐进。更好代表着更高层次的境界,举个例子,有人问“你觉得我和某某谁好看
  </p>
  <h2>Chapter 2.1</h2>
  <p>
    最好表示已经没有上升空间,永远只在一个固定的模式上循环渐进。更好代表着更高层次的境界,举个例子,有人问“你觉得我和某某谁好看
  </p>
  <h2>Chapter 2.1</h2>
  <p>
    最好表示已经没有上升空间,永远只在一个固定的模式上循环渐进。更好代表着更高层次的境界,举个例子,有人问“你觉得我和某某谁好看
  </p>
</div>
<div id="catalog"></div>
1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago