diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-24 00:54:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-24 00:54:59 -0400 |
commit | e90d67d3c9a93862657563e17e24054087f205d1 (patch) | |
tree | d1bfb530411c4ae2b9bb95737608ee3090a20c0a /underlays/javascript/toggle.js | |
parent | b28323e76a98d56fa4af813338a134dea0106626 (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.js | 29 |
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"; -} |