Template:Team:HKU-HKBU/script.js
From 2009.igem.org
(Difference between revisions)
YinanZhang (Talk | contribs) |
|||
(28 intermediate revisions not shown) | |||
Line 102: | Line 102: | ||
tabs[0] = new LeftTab(12, 0, 2, 0, "HOME", "Home", false); | tabs[0] = new LeftTab(12, 0, 2, 0, "HOME", "Home", false); | ||
tabs[1] = new LeftTab(12, 0, 2, 0, "PROJECT", "Project", false); | tabs[1] = new LeftTab(12, 0, 2, 0, "PROJECT", "Project", false); | ||
- | tabs[2] = new LeftTab(0, 0, 1, 1, "Parts", "", true); | + | tabs[2] = new LeftTab(0, 0, 1, 1, "Parts", "Parts", true); |
tabs[3] = new LeftTab(0, 0, 1, 1, "Micro-Motor", "Motor_Overview", false); | tabs[3] = new LeftTab(0, 0, 1, 1, "Micro-Motor", "Motor_Overview", false); | ||
tabs[4] = new LeftTab(0, 0, 0, 2, "Overview", "Motor_Overview", false); | tabs[4] = new LeftTab(0, 0, 0, 2, "Overview", "Motor_Overview", false); | ||
Line 125: | Line 125: | ||
tabs[2].address = "http://partsregistry.org/cgi/partsdb/pgroup.cgi?pgroup=iGEM2009&group=HKU-HKBU"; | tabs[2].address = "http://partsregistry.org/cgi/partsdb/pgroup.cgi?pgroup=iGEM2009&group=HKU-HKBU"; | ||
+ | tabs[3].address = "./Motor_Overview"; | ||
+ | tabs[8].address = "./Polar_Expression_Design"; | ||
+ | tabs[12].address = "./Speed_Control_Design"; | ||
+ | |||
var i = 0; | var i = 0; | ||
for (i in tabs) | for (i in tabs) | ||
Line 166: | Line 170: | ||
for (i in logos) | for (i in logos) | ||
logos[i].addToLogos(); | logos[i].addToLogos(); | ||
+ | } | ||
+ | |||
+ | function removeTitle(){ | ||
+ | var el = document.getElementsByTagName("h1")[0]; | ||
+ | if (el != null) { | ||
+ | if (el.childNodes) { | ||
+ | for (var i = 0; i < el.childNodes.length; i++) { | ||
+ | var childNode = el.childNodes[i]; | ||
+ | el.removeChild(childNode); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function modifyTopBar(){ | ||
+ | var el = document.getElementById("tabs"); | ||
+ | var aNodes = el.getElementsByTagName("a"); | ||
+ | for (var i = 0; i < aNodes.length; i++) { | ||
+ | if (aNodes[i].getAttribute("href") == document.URL) { | ||
+ | aNodes[i].style.backgroundPosition="0% -42px"; | ||
+ | var sNode = aNodes[i].getElementsByTagName("span")[0]; | ||
+ | sNode.style.backgroundPosition="100% -42px"; | ||
+ | } | ||
+ | } | ||
} | } | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 12:38, 18 October 2009