Template:Kyoto/js
From 2012.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<html> | <html> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
function showTab(tabname) { | function showTab(tabname) { | ||
var children = document.getElementById("kyoto-tab-contents").childNodes; | var children = document.getElementById("kyoto-tab-contents").childNodes; | ||
Line 18: | Line 13: | ||
function changeTab(self) { | function changeTab(self) { | ||
var tabs = $("#kyoto-tabs").children("li"); | var tabs = $("#kyoto-tabs").children("li"); | ||
- | + | for (var i = 0; i < tabs.length; i++) tabs[i].style.zIndex = 99; | |
- | for (i = 0; i < tabs.length; i++) tabs[i].style.zIndex = 99; | + | |
self.style.zIndex = 101; | self.style.zIndex = 101; | ||
} | } | ||
+ | |||
+ | $(function() { | ||
+ | setScroll($("#kyoto-menu")); | ||
+ | setScroll($(".kyoto-post-it")); | ||
+ | $("#kyoto-tabs").children("li").click(function() { | ||
+ | changeTab($(self)); | ||
+ | }); | ||
+ | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 04:36, 26 September 2012