Team:Heidelberg/Templates/StartPage
From 2013.igem.org
(Difference between revisions)
m |
m |
||
Line 71: | Line 71: | ||
var angle = Math.PI * 0.5 - beta; | var angle = Math.PI * 0.5 - beta; | ||
return angle; | return angle; | ||
+ | } | ||
+ | function rotateMenu(id, angle) | ||
+ | { | ||
+ | var root = document.getElementById(id); | ||
+ | root.style = "transform:rotate(" + angle + "rad)"; | ||
+ | var children = root.children; | ||
+ | for (var i = 0; i < children; ++i) { | ||
+ | if (children[i].nodeName == "UL") { | ||
+ | children[i].style = "transform:rotate(" + (angle * -1) + "rad)"; | ||
+ | } | ||
+ | } | ||
} | } | ||
window.onload = function() { | window.onload = function() { | ||
- | + | rotateMenu("menu-team", getMenuAngle(2.5)); | |
- | + | rotateMenu("menu-project", getMenuAngle(1.5)); | |
- | + | rotateMenu("menu-notebook", getMenuAngle(0.5)); | |
- | + | rotateMenu("menu-modelling", -getMenuAngle(0.5)); | |
- | + | rotateMenu("menu-human", -getMenuAngle(1.5)); | |
- | + | rotateMenu("menu-safety", -getMenuAngle(2.5)); | |
} | } | ||
</script> | </script> |
Revision as of 14:12, 21 August 2013