Team:Heidelberg/Templates/StartPage
From 2013.igem.org
(Difference between revisions)
JuliaS1992 (Talk | contribs) m |
|||
Line 97: | Line 97: | ||
function rotateMenu(id, angle, factor) { | function rotateMenu(id, angle, factor) { | ||
if (factor !== undefined) | if (factor !== undefined) | ||
- | + | angle[0] *= factor; | |
var root = document.getElementById(id); | var root = document.getElementById(id); | ||
- | root.style = " | + | root.style = "position:relative; top:calc(5.5em - " + angle[1] + "px);"; // 100px from #main-menu |
var children = root.children; | var children = root.children; | ||
for (var i = 0; i < children.length; ++i) { | for (var i = 0; i < children.length; ++i) { | ||
- | + | if (children[i].nodeName == "A") { | |
- | + | children[i].style = "transform:rotate(" + angle[0] + "rad)"; | |
+ | break; | ||
} | } | ||
} | } |
Revision as of 09:27, 26 August 2013