Team:Alberta/Templates/Header

From 2012.igem.org

(Difference between revisions)
 
(37 intermediate revisions not shown)
Line 166: Line 166:
border-radius: 15px;
border-radius: 15px;
background-color: #E5DDDD;
background-color: #E5DDDD;
-
padding: 10px;
+
padding: 5px;
}
}
Line 202: Line 202:
</script>
</script>
-
<script>
 
-
function showSubMenu(menu, parent) {
 
-
    var show = false;
 
-
    if($(menu).is(':hidden') ) {
 
-
        show = true;
 
-
    }
 
-
 
-
    $(".subMenu").css("display","none");
 
-
        $(menu).css("display","block");
 
-
    $(menu). offset({top: 100 + 30 * $('.headerMenu').index($(parent) )} );
 
-
   
 
-
}
 
-
 
-
$('li').click( function() {
 
-
 
-
alert($('li').index(this));
 
-
 
-
});
 
-
 
-
function writeCookie(name,value,days) {
 
-
    var date, expires;
 
-
    if (days) {
 
-
        date = new Date();
 
-
        date.setTime(date.getTime()+(days*24*60*60*1000));
 
-
        expires = "; expires=" + date.toGMTString();
 
-
            }else{
 
-
        expires = "";
 
-
    }
 
-
    document.cookie = name + "=" + value + expires + "; path=/";
 
-
}
 
-
 
-
function readCookie(name) {
 
-
    var i, c, ca, nameEQ = name + "=";
 
-
    ca = document.cookie.split(';');
 
-
    for(i=0;i < ca.length;i++) {
 
-
        c = ca[i];
 
-
        while (c.charAt(0)==' ') {
 
-
            c = c.substring(1,c.length);
 
-
        }
 
-
        if (c.indexOf(nameEQ) == 0) {
 
-
            return c.substring(nameEQ.length,c.length);
 
-
        }
 
-
    }
 
-
    return '';
 
-
}
 
-
</script>
 
<table cellpadding="0" cellspacing="0" style="width: 100%;">
<table cellpadding="0" cellspacing="0" style="width: 100%;">
Line 261: Line 215:
-
<li class="headerMenu" onMouseOver="showSubMenu(contactSub, this);"><a href="#"><span>Project</span></a></li>
+
<li class="headerMenu" onMouseOver="showSubMenu(null, this);"><a href="/Team:Alberta/Project"><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>
Line 278: Line 232:
</div>
</div>
-
<li class="headerMenu" onMouseOver="showSubMenu(diarySub, this);"><a href="#"><span>Notebook</span></a></li>
 
-
<div  class="subMenu" id="diarySub">
 
-
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Notebook"><span>Journal</span></a></li>
 
-
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Protocols"><span>Protocols</span></a></li>
 
-
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Safety"><span>Safety</span></a></li>
 
-
</div>
 
-
<li class="headerMenu" onMouseOver="showSubMenu(outreachSub, this);"><a href="#"><span>Outreach</span></a></li>
+
 
 +
<li class="headerMenu" onMouseOver="showSubMenu(null, this);"><a href="/Team:Alberta/Humanpractices"><span>Human Practice</span></a></li>
<div  class="subMenu" id="outreachSub">
<div  class="subMenu" id="outreachSub">
-
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Humanpratices"><span>Human Pratices</span></a></li>
+
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/socialexperiment"><span>A social experiment</span></a></li>
 +
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Outreach"><span>Outreach</span></a></li>
 +
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/collaborations"><span>Collaborations</span></a></li>
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Safety"><span>Safety</span></a></li>
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Safety"><span>Safety</span></a></li>
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Attributions"><span>Attributions</span></a></li>
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Attributions"><span>Attributions</span></a></li>
</div>
</div>
-
<li class="headerMenu" onMouseOver="showSubMenu(sponsorsSub, this);"><a href="#"><span>Sponsors</span></a></li>
+
 
 +
<li class="headerMenu" onMouseOver="showSubMenu(null, this);"><a href="/Team:Alberta/Safety"><span>Safety</span></a></li>
 +
 
 +
<li class="headerMenu" onMouseOver="showSubMenu(null, this);"><a href="/Team:Alberta/Sponsors"><span>Sponsors</span></a></li>
<div  class="subMenu" id="sponsorsSub">
<div  class="subMenu" id="sponsorsSub">
-
<li><a style="padding:8px 20px 0 35px;" href="/Team:Alberta/Sponsors"><span>About Sponsors</span></a></li>
+
<li><a style="padding:8px 20px 0 35px;" href#"><span>About Sponsors</span></a></li>
</div>
</div>
Line 318: Line 272:
</tr>
</tr>
</table>
</table>
 +
 +
<script>
 +
 +
function showSubMenu(menu, parent) {
 +
 +
    var show = false;
 +
    if($(menu).is(':hidden') ) {
 +
        show = true;
 +
    }
 +
 +
    $(".subMenu").css("display","none");
 +
        $(menu).css("display","block");
 +
    $(menu). offset({top: 100 + 30 * $('.headerMenu').index($(parent) )} );
 +
 +
$(menu).mouseleave( function() {
 +
 +
$(".subMenu").css("display","none");
 +
 +
});
 +
   
 +
}
 +
 +
</script>
<div class="mainBody">
<div class="mainBody">

Latest revision as of 17:51, 2 October 2012