Team:Alberta/Templates/Header

From 2012.igem.org

(Difference between revisions)
Line 203: Line 203:
<script>
<script>
-
function showSubMenu(menu) {
+
$(".subMenu").onMouseOver(function() {
     var show = false;
     var show = false;
-
     if($(menu).is(':hidden') ) {
+
     if(this.is(':hidden') ) {
         show = true;
         show = true;
     }
     }
     $(".subMenu").css("display","none");
     $(".subMenu").css("display","none");
-
         $(menu).css("display","block");
+
         this.css("display","block");
-
alert("This index: " + $("#menu li.headerMenu").index( $(menu).get() ) );
+
alert("This index: " + $("li.headerMenu").index( this ) );
      
      
-
}
+
});
</script>
</script>
Line 228: Line 228:
-
<li class="headerMenu" onMouseOver="showSubMenu(contactSub);"><a href="#"><span>Project</span></a></li>
+
<li class="headerMenu"><a href="#"><span>Project</span></a></li>
<div  class="subMenu" id="contactSub">
<div  class="subMenu" id="contactSub">
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Project"><span>Overview</span></a></li>
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Project"><span>Overview</span></a></li>

Revision as of 19:31, 25 September 2012