Team:Alberta/Templates/Header

From 2012.igem.org

(Difference between revisions)
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 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) )} );
 +
   
 +
}
 +
 +
$("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>
<div class="mainBody">
<div class="mainBody">

Revision as of 15:03, 26 September 2012