Add chiniese doc

This commit is contained in:
qingwei.li 2016-11-26 17:24:32 +08:00
commit 1bf7b23d33
8 changed files with 242 additions and 42 deletions

View file

@ -18,12 +18,12 @@ function scrollActiveSidebar () {
const node = anchors[i].parentNode
const bcr = node.getBoundingClientRect()
if (bcr.top < 150 && bcr.bottom > 150) {
const li = nav[ node.id ]
if (bcr.top < 10 && bcr.bottom > 10) {
const li = nav[node.id]
if (li === active) return
if (active) active.classList.remove('active')
if (active) active.setAttribute('class', '')
li.classList.add('active')
li.setAttribute('class', 'active')
active = li
return