Template:Michigan Header2
From 2011.igem.org
(Difference between revisions)
(18 intermediate revisions not shown) | |||
Line 11: | Line 11: | ||
<meta property="fb:admins" content="1585748486" /> | <meta property="fb:admins" content="1585748486" /> | ||
- | <!-- | + | <!-- Lightbox 2 Javascript Links --> |
- | < | + | <script type="text/javascript" src="http://www-personal.umich.edu/~cbate/js/prototype.js"></script> |
+ | <script type="text/javascript" src="http://www-personal.umich.edu/~cbate/js/scriptaculous.js?load=effects,builder"></script> | ||
+ | <script type="text/javascript" src="http://www-personal.umich.edu/~cbate/js/lightbox.js"></script> | ||
+ | <!-- STYLESHEET LINK, TEMPORARY WILL UPLOAD TO WIKI LOCAL --> | ||
+ | <link rel="stylesheet" type="text/css" media="screen" href="http://www-personal.umich.edu/~cbate/styleUL.css" /> | ||
</head> | </head> | ||
Line 26: | Line 30: | ||
<!-- JAVASCRIPT FUNCTIONS --> | <!-- JAVASCRIPT FUNCTIONS --> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | var ContentHeight= | + | var ContentHeight=100; |
var TimeToSlide = 250; | var TimeToSlide = 250; | ||
var openAccordion = ''; | var openAccordion = ''; | ||
- | function animate( lastTick, timeLeft, closingId, openingId ) | + | function animate( lastTick, timeLeft, closingId, openingId, openHeight, closeHeight ) |
{ | { | ||
var curTick = new Date().getTime(); | var curTick = new Date().getTime(); | ||
var elapsedTicks = curTick - lastTick; | var elapsedTicks = curTick - lastTick; | ||
- | + | ||
var opening = (openingId == '') ? null : document.getElementById(openingId); | var opening = (openingId == '') ? null : document.getElementById(openingId); | ||
var closing = (closingId == '') ? null : document.getElementById(closingId); | var closing = (closingId == '') ? null : document.getElementById(closingId); | ||
Line 41: | Line 45: | ||
{ | { | ||
if(opening != null) | if(opening != null) | ||
- | opening.style.height = | + | opening.style.height = (openHeight + 'px'); |
if(closing != null) | if(closing != null) | ||
Line 50: | Line 54: | ||
return; | return; | ||
} | } | ||
+ | |||
+ | if(closing != null) | ||
+ | { | ||
+ | closing.style.display = 'none'; | ||
+ | } | ||
timeLeft -= elapsedTicks; | timeLeft -= elapsedTicks; | ||
- | var newClosedHeight = Math.round((timeLeft/TimeToSlide) * | + | var newClosedHeight = Math.round((timeLeft/TimeToSlide) * closeHeight); |
+ | var openFactor = Math.round((timeLeft/TimeToSlide) * openHeight); | ||
if(opening != null) | if(opening != null) | ||
Line 58: | Line 68: | ||
if(opening.style.display != 'block') | if(opening.style.display != 'block') | ||
opening.style.display = 'block'; | opening.style.display = 'block'; | ||
- | opening.style.height = ( | + | opening.style.height = (openHeight - openFactor) + 'px'; |
} | } | ||
Line 64: | Line 74: | ||
closing.style.height = newClosedHeight + 'px'; | closing.style.height = newClosedHeight + 'px'; | ||
- | setTimeout("animate(" + curTick + "," + timeLeft + ",'" + closingId + "','" + openingId + "')", 33); | + | setTimeout("animate(" + curTick + "," + timeLeft + ",'" + closingId + "','" + openingId + "'," + openHeight + "," + closeHeight +" )", 33); |
} | } | ||
- | function runAccordion(index) | + | function runAccordion(index, openHeight, closeHeight ) |
{ | { | ||
var nID = "Acc" + index + "Content"; | var nID = "Acc" + index + "Content"; | ||
Line 75: | Line 85: | ||
} | } | ||
- | setTimeout( "animate(" + new Date().getTime() + "," + TimeToSlide + ",'" + openAccordion + "','" + nID + "')", 33); | + | setTimeout( "animate(" + new Date().getTime() + "," + TimeToSlide + ",'" + openAccordion + "','" + nID + "'," + openHeight + "," + closeHeight + ")", 33); |
openAccordion = nID; | openAccordion = nID; | ||
} | } | ||
Line 90: | Line 100: | ||
<li><a href="https://2011.igem.org/Team:Michigan">Home</a></li> | <li><a href="https://2011.igem.org/Team:Michigan">Home</a></li> | ||
- | <div onclick="runAccordion(1);"> | + | <div onclick="runAccordion(1, 80, 100 );"> |
<li><a>Team</a></li> | <li><a>Team</a></li> | ||
Line 108: | Line 118: | ||
<li><a href="https://2011.igem.org/Team:Michigan/Parts">BioBricks</li> | <li><a href="https://2011.igem.org/Team:Michigan/Parts">BioBricks</li> | ||
- | <div onclick="runAccordion(3);"> | + | <div onclick="runAccordion(3, 105, 100 );"> |
<li><a>Human Practices</a></li> | <li><a>Human Practices</a></li> | ||
Line 115: | Line 125: | ||
<div id="Acc3Content" class="AccContent"> | <div id="Acc3Content" class="AccContent"> | ||
<ul> | <ul> | ||
+ | <li><a href="https://2011.igem.org/Team:Michigan/Human_Practices_Overview">Overview</a></li> | ||
<li><a href="https://2011.igem.org/Team:Michigan/Human_Practices">Notebook</a></li> | <li><a href="https://2011.igem.org/Team:Michigan/Human_Practices">Notebook</a></li> | ||
- | <li><a href="">Blog</a></li> | + | <li><a href="http://michigansbt.wordpress.com/">Blog</a></li> |
</ul> | </ul> | ||
</div> | </div> | ||
- | <div onclick="runAccordion(2);"> | + | <div onclick="runAccordion(2, 105, 100);"> |
<li><a>Notebooks</a></li> | <li><a>Notebooks</a></li> | ||
Line 129: | Line 140: | ||
<ul> | <ul> | ||
<li><a href="https://2011.igem.org/Team:Michigan/Notebook">Main Notebook</a></li> | <li><a href="https://2011.igem.org/Team:Michigan/Notebook">Main Notebook</a></li> | ||
+ | <li><a href="https://2011.igem.org/Team:Michigan/DryLabNotebook">Dry Lab Notebook</a></li> | ||
<li><a href="https://2011.igem.org/Team:Michigan/WikiNotebook">Wiki Development</a></li> | <li><a href="https://2011.igem.org/Team:Michigan/WikiNotebook">Wiki Development</a></li> | ||
</ul> | </ul> |
Latest revision as of 15:18, 1 August 2011