Tec-Monterrey/teammembers/students

From 2011.igem.org

(Difference between revisions)
Line 11: Line 11:
}
}
 +
.container {
 +
font:12px arial;
 +
width:500;
 +
max-width:500;
 +
height:100;
 +
max-height:100;
 +
border:none;
 +
overflow:auto;
 +
padding:5;
 +
border:1px solid black;
 +
text-align: center;
 +
}
 +
.gallery {
 +
font:12px arial;
 +
width:500;
 +
max-width:500;
 +
border:none;
 +
padding:5;
 +
text-align: center;
 +
}
#p-logo {
#p-logo {
   position: absolute;
   position: absolute;
Line 236: Line 256:
<script type="text/javascript">
<script type="text/javascript">
<!--
<!--
 +
i = 0;
 +
st1 = 100;
 +
st2 = 0;
 +
var speed = 10;
-
 
+
function scrollRt() {
-
//Magic
+
i = i + speed;
-
var galimg = 0;
+
var div = document.getElementById("cont1");
-
var imgpath = new Array();
+
div.scrollLeft = i;
-
imgpath[0] = "https://static.igem.org/mediawiki/2011/8/89/DSC_0061.JPG";
+
if (i > div.scrollLeft) {i = 500;}
-
imgpath[1] = "https://static.igem.org/mediawiki/2011/7/7c/DSC_0053.JPG";
+
t1=setTimeout("scrollRt()",100);
-
imgpath[2] = "https://static.igem.org/mediawiki/2011/8/89/DSC_0002.JPG";
+
}
-
imgpath[3] = "https://static.igem.org/mediawiki/2011/d/d8/DSC_0066.JPG";
+
function scrollLf() {
-
imgpath[4] = "https://static.igem.org/mediawiki/2011/1/12/DSC_0080.JPG";
+
i = i - speed;
-
imgpath[5] = "https://static.igem.org/mediawiki/2011/3/35/DSC_0134.JPG";
+
var div = document.getElementById("cont1");
-
imgpath[6] = "https://static.igem.org/mediawiki/2011/8/85/DSC_0215.JPG";
+
div.scrollLeft = i;
-
imgpath[7] = "https://static.igem.org/mediawiki/2011/d/de/DSC_0218.JPG";
+
if (i < 0) {i = 0;}
-
imgpath[8] = "https://static.igem.org/mediawiki/2011/f/f4/DSC_0023.JPG";
+
t1=setTimeout("scrollLf()",100);
-
imgpath[9] = "https://static.igem.org/mediawiki/2011/a/ad/IMG_8723.JPG";
+
}
-
imgpath[10] = "https://static.igem.org/mediawiki/2011/4/4d/IMG_8567.JPG";
+
function changeImg(n) {
-
imgpath[11]= "https://static.igem.org/mediawiki/2011/1/15/IMG_8706.JPG";
+
//url goes here
-
 
+
var imgname = new Array();
-
 
+
imgname[0] = "file:///C:/Users/Luis/Downloads/philosoraptor01.jpg";
-
function moveLeft()
+
imgname[1] = "file:///C:/Users/Luis/Downloads/philosoraptor02.jpg";
-
{
+
imgname[2] = "file:///C:/Users/Luis/Downloads/philosoraptor03.jpg";
-
galimg -= 1;
+
imgname[3] = "file:///C:/Users/Luis/Downloads/philosoraptor04.jpg";
 +
imgname[4] = "file:///C:/Users/Luis/Downloads/philosoraptor05.jpg";
-
if (galimg < 0)
+
var name = imgname[n];
-
galimg = imgpath.length - 1;
+
var imgobj = document.getElementById('galImg');
-
+
animTransA();
-
document.getElementById('imgGal').src = imgpath[galimg];
+
imgobj.src = name;
 +
animTransB();
 +
}
 +
function animTransA() {
 +
st1 -= speed;
 +
img = document.getElementById('galImg');
 +
img.style.opacity = st1/100;
 +
img.style.filter = 'alpha(opacity=' + st1 + ')';
 +
if (st1 > 0) { t2=setTimeout("animTransA()",50); }
 +
else { st1 = 100;}
 +
}
 +
function animTransB () {
 +
st2 += speed;
 +
img = document.getElementById('galImg');
 +
img.style.opacity = st2/100;
 +
img.style.filter = 'alpha(opacity=' + st2 + ')';
 +
if (st2 < 100) { t3=setTimeout("animTransB()",50); }
 +
else { st2 = 0;}
 +
}
 +
function resetAlpha() {
 +
clearTimeout(t2);
 +
clearTimeout(t3);
 +
img = document.getElementById('galImg');
 +
img.style.opacity = 1;
 +
st1 = 100; st2 = 0;
 +
img.style.filter = 'alpha(opacity=' + 100 + ')';
}
}
-
function moveRight()
+
 
-
{
+
-
galimg += 1;
+
-
+
-
if (galimg >= imgpath.length)
+
-
galimg = 0;
+
-
+
-
document.getElementById('imgGal').src = imgpath[galimg];
+
-
}
+
// -----------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------
Line 580: Line 622:
  <div style="  text-align:center; ">
  <div style="  text-align:center; ">
      
      
-
     <div class="gallery" id="gallery">
+
     <div class="gallery">
-
      <p><a href="#" onClick="moveLeft()"><img src="https://static.igem.org/mediawiki/2011/d/d5/Backbutton.png" width="50" height="112">
+
-
</a><img src="https://static.igem.org/mediawiki/2011/8/89/DSC_0061.JPG" alt="dasdfa" name="imgGal" width="400" height="300" id="imgGal" longdesc="http://asfsdfa">
+
-
<a href="#" onClick="moveRight()"><img src="https://static.igem.org/mediawiki/2011/e/ea/ButtonNext.png" width="50" height="112"></a>
+
<img src="file:///C:/Users/Luis/Downloads/philosoraptor01.jpg" alt="rawr" name="raptor" width="400" height="400" id="galImg" longdesc=" ">
-
      </p>
+
</div>
-
      <p><img name="" src="https://static.igem.org/mediawiki/2011/d/d2/Meetteam.png" width="623" height="143" alt=""></p>
+
<div class="container" id="cont1">
-
        </div>   
+
<input type="button" value="              0              " onmouseover="changeImg(0)" onmouseout="resetAlpha()">
 +
<input type="button" value="             1              " onmouseover="changeImg(1)" onmouseout="resetAlpha()">
 +
<input type="button" value="              2              " onmouseover="changeImg(2)" onmouseout="resetAlpha()">
 +
<input type="button" value="              3              " onmouseover="changeImg(3)" onmouseout="resetAlpha()">
 +
<input type="button" value="              4              " onmouseover="changeImg(4)" onmouseout="resetAlpha()">
 +
</div>
 +
<br><input type="button" value="Left" onmouseover="scrollLf()" onmouseout="clearTimeout(t1)">
 +
<br><input type="button" value="Right" onmouseover="scrollRt()" onmouseout="clearTimeout(t1)">
 +
</body>
 +
   
   </div>
   </div>
</div></div></body></html>
</div></div></body></html>

Revision as of 16:36, 30 August 2011

wiki