Team:Queens Canada/Intro/Team
From 2011.igem.org
(Difference between revisions)
Line 153: | Line 153: | ||
</div> | </div> | ||
<div id="Accordion2Content1" class="AccordionContent1"> | <div id="Accordion2Content1" class="AccordionContent1"> | ||
- | + | text | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</div> | </div> | ||
Line 249: | Line 243: | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | var | + | var ContentHeight = 200; |
- | var | + | var TimeToSlide = 300.0; |
- | var | + | var openAccordion = ''; |
function runAccordion1(index, AccHeight1) | function runAccordion1(index, AccHeight1) | ||
{ | { | ||
- | + | ContentHeight = AccHeight; | |
- | var nID = " | + | var nID = "Accordion" + index + "Content"; |
- | if( | + | if(openAccordion == nID) |
nID = ''; | nID = ''; | ||
- | + | setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'" | |
+ openAccordion + "','" + nID + "')", 33); | + openAccordion + "','" + nID + "')", 33); | ||
- | + | openAccordion = nID; | |
} | } | ||
Line 272: | Line 266: | ||
function animate1(lastTick, timeLeft, closingId, openingId) | function animate1(lastTick, timeLeft, closingId, openingId) | ||
{ | { | ||
- | var | + | var curTick = new Date().getTime(); |
- | var | + | var elapsedTicks = curTick - lastTick; |
- | var | + | var opening = (openingId == '') ? null : document.getElementById(openingId); |
- | var | + | var closing = (closingId == '') ? null : document.getElementById(closingId); |
- | if( | + | if(timeLeft <= elapsedTicks) |
{ | { | ||
if(opening != null) | if(opening != null) | ||
- | opening.style.height = | + | opening.style.height = ContentHeight + 'px'; |
if(closing != null) | if(closing != null) | ||
Line 291: | Line 285: | ||
} | } | ||
- | + | timeLeft -= elapsedTicks; | |
- | var | + | var newClosedHeight = Math.round((timeLeft/TimeToSlide) * ContentHeight); |
if(opening != null) | if(opening != null) |
Revision as of 23:13, 20 June 2011
introduction
project nemo
side projects
parts
human practices
notebook
partners
extras
Student Members
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Project Nemo
text
Side Projects
Parts