diff options
author | simonmar <unknown> | 2004-03-25 15:17:24 +0000 |
---|---|---|
committer | simonmar <unknown> | 2004-03-25 15:17:24 +0000 |
commit | 40f44d7bd3afb519fb92297cf03aa52db2844eda (patch) | |
tree | 4e680e63c17b7fb0c91218eaa738a1720d500af2 /html/haddock.js | |
parent | 7b87344c5f8aa3017aa6aebc851ce14b7bee0696 (diff) |
[haddock @ 2004-03-25 15:17:23 by simonmar]
Add support for collaspible parts of the page, with a +/- button and a
bit of JavaScript. Make the instances collapsible, and collapse them
by default.
This makes documentation with long lists of instances (eg. the
Prelude) much easier to read. Maybe we should give other
documentation sections the same treatment.
Diffstat (limited to 'html/haddock.js')
-rw-r--r-- | html/haddock.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/html/haddock.js b/html/haddock.js new file mode 100644 index 00000000..4f6a2e44 --- /dev/null +++ b/html/haddock.js @@ -0,0 +1,11 @@ +// Haddock JavaScript utilities +function toggle(button,id) { + var n = document.getElementById(id).style; + if (n.display == "none") { + button.childNodes[0].data = "-"; + n.display = "inline"; + } else { + button.childNodes[0].data = "+"; + n.display = "none"; + } +} |