summaryrefslogtreecommitdiff
path: root/underlays/javascript/toggle.js
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-24 00:54:59 -0400
committerJoey Hess <joey@kitenet.net>2010-04-24 00:54:59 -0400
commite90d67d3c9a93862657563e17e24054087f205d1 (patch)
treed1bfb530411c4ae2b9bb95737608ee3090a20c0a /underlays/javascript/toggle.js
parentb28323e76a98d56fa4af813338a134dea0106626 (diff)
Moved javascript files under the ikiwiki/ directory, to avoid cluttering the top of the web root. This is another things that requires a wiki rebuild on upgrade to this version.
Diffstat (limited to 'underlays/javascript/toggle.js')
-rw-r--r--underlays/javascript/toggle.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/underlays/javascript/toggle.js b/underlays/javascript/toggle.js
deleted file mode 100644
index d190b737a..000000000
--- a/underlays/javascript/toggle.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Uses CSS to hide toggleables, to avoid any flashing on page load. The
-// CSS is only emitted after it tests that it's going to be able
-// to show the toggleables.
-if (document.getElementById && document.getElementsByTagName && document.createTextNode) {
- document.write('<style type="text/css">div.toggleable { display: none; }</style>');
- hook("onload", inittoggle);
-}
-
-function inittoggle() {
- var as = getElementsByClass('toggle');
- for (var i = 0; i < as.length; i++) {
- var id = as[i].href.match(/#(\w.+)/)[1];
- if (document.getElementById(id).className == "toggleable")
- document.getElementById(id).style.display="none";
- as[i].onclick = function() {
- toggle(this);
- return false;
- }
- }
-}
-
-function toggle(s) {
- var id = s.href.match(/#(\w.+)/)[1];
- style = document.getElementById(id).style;
- if (style.display == "none")
- style.display = "block";
- else
- style.display = "none";
-}