Commit e7f45314 authored by Andrew Gerrand's avatar Andrew Gerrand

godoc: show contents in correct order, expand sections on click

R=dsymonds
CC=gobot, golang-dev
https://golang.org/cl/6588079
parent ce6acefc
...@@ -208,6 +208,8 @@ function godocs_onload() { ...@@ -208,6 +208,8 @@ function godocs_onload() {
godocs_bindToggles("toggleVisible"); godocs_bindToggles("toggleVisible");
godocs_bindToggleLinks("exampleLink", "example_"); godocs_bindToggleLinks("exampleLink", "example_");
godocs_bindToggleLinks("overviewLink", ""); godocs_bindToggleLinks("overviewLink", "");
godocs_bindToggleLinks("examplesLink", "");
godocs_bindToggleLinks("indexLink", "");
} }
bindEvent(window, 'load', godocs_onload); bindEvent(window, 'load', godocs_onload);
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
</dl> </dl>
<dl> <dl>
<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd> <dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
<dd><a href="#pkg-index">Index</a></dd>
{{if $.Examples}} {{if $.Examples}}
<dd><a href="#pkg-examples">Examples</a></dd> <dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
{{end}} {{end}}
<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
{{if $.Dirs}} {{if $.Dirs}}
<dd><a href="#pkg-subdirectories">Subdirectories</a></dd> <dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
{{end}} {{end}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment