Skip to content

Commit

Permalink
Fix nav highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Jan 4, 2017
1 parent 24ab3d4 commit 7be6baa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { load, camel2kebab, isNil, getRoute } from './util'
import { scrollIntoView } from './event'
import { scrollIntoView, activeLink } from './event'
import * as render from './render'

const OPTIONS = {
Expand Down Expand Up @@ -92,7 +92,10 @@ const Docsify = function () {
const dom = document.querySelector(OPTIONS.el) || document.body
const replace = dom !== document.body
const main = function () {
mainRender(_ => scrollIntoView())
mainRender(_ => {
scrollIntoView()
activeLink('nav')
})
}

// Render app
Expand Down

0 comments on commit 7be6baa

Please sign in to comment.