Template:Menu
From 2013.igem.org
(Difference between revisions)
Hristianita (Talk | contribs) |
Hristianita (Talk | contribs) |
||
Line 21: | Line 21: | ||
</ul> | </ul> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | |||
+ | $(function() { | ||
+ | var menu = document.getElementById("menu_items"); | ||
+ | var menu_items = menu.childNodes; | ||
+ | for (var i=0; i< menu_items.length; i++) { | ||
+ | if (menu_items[i].tagName == "LI") { | ||
+ | menu_items[i].onmouseover = (function() { | ||
+ | var item = menu_items[i]; | ||
+ | return function() { | ||
+ | var children = item.childNodes; | ||
+ | for (var j=0; j< children.length; j++) { | ||
+ | if (children[j].tagName == "UL") { | ||
+ | children[j].style.display="block"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | } | ||
+ | })(); | ||
+ | |||
+ | menu_items[i].onmouseout = (function() { | ||
+ | var item = menu_items[i]; | ||
+ | return function() { | ||
+ | var children = item.childNodes; | ||
+ | for (var j=0; j< children.length; j++) { | ||
+ | if (children[j].tagName == "UL") { | ||
+ | children[j].style.display= "none"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | } | ||
+ | })(); | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | var links = document.getElementsByTagName( 'a' ); | ||
+ | |||
+ | for( var index = 0; index < links.length; index++ ) { | ||
+ | links[index].removeAttribute( 'title' ); | ||
+ | }; | ||
+ | </script> |