Template:Team:Waterloo/JS/baseWiki
From 2014.igem.org
(Difference between revisions)
(One intermediate revision not shown) | |||
Line 6: | Line 6: | ||
function alignHeadings(){ | function alignHeadings(){ | ||
var remainingWidth = $("div#topbar").width(); | var remainingWidth = $("div#topbar").width(); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
var allheadings = $("ul#headings >li"); | var allheadings = $("ul#headings >li"); | ||
allheadings.css("display", "block"); | allheadings.css("display", "block"); | ||
Line 16: | Line 11: | ||
allheadings.width(remainingWidth / (allheadings.length + 0.5)) | allheadings.width(remainingWidth / (allheadings.length + 0.5)) | ||
.css({"text-align":"center","line-height":"150%"}); | .css({"text-align":"center","line-height":"150%"}); | ||
+ | } | ||
+ | |||
+ | function toggleNavPanel(x){ | ||
+ | var panel = document.getElementById(x), | ||
+ | navarrow = document.getElementsByClassName("navarrow"), | ||
+ | maxH="320px"; | ||
+ | if(panel.style.height == maxH){ | ||
+ | panel.style.height = "0px"; | ||
+ | navarrow[0].innerHTML = "▾"; | ||
+ | navarrow[1].innerHTML = "▾"; | ||
+ | } | ||
+ | else { | ||
+ | panel.style.height = maxH; | ||
+ | navarrow[0].innerHTML = "▴"; | ||
+ | navarrow[1].innerHTML = "▴"; | ||
} | } | ||
} | } |
Latest revision as of 05:06, 16 October 2014