Team:Goettingen/suplement/scripts

From 2013.igem.org

(Difference between revisions)
m
m
Line 32: Line 32:
{
{
$("#slide").fadeOut(300,function(){
$("#slide").fadeOut(300,function(){
-
//alert(i);
+
//alert(picSlide_i);
-
document.getElementById("slide").src=e[i];
+
document.getElementById("slide").src=e[picSlide_i];
-
document.getElementById("slide-a").href = link[i];
+
document.getElementById("slide-a").href = link[picSlide_i];
-
i++;
+
picSlide_i++;
-
                 //alert(i);
+
                 //alert(picSlide_i);
$("#slide").fadeIn(300,slide_ctrl());
$("#slide").fadeIn(300,slide_ctrl());
});
});
Line 47: Line 47:
function startslide()
function startslide()
{
{
-
if(i > 3) i = 0;
+
if(picSlide_i > 3) picSlide_i = 0;
fadeInOut();
fadeInOut();
$("#resume").hide();
$("#resume").hide();
Line 70: Line 70:
var text = '<span id="slide-ctrl-1">';
var text = '<span id="slide-ctrl-1">';
for(x=0;x<=2;x++){
for(x=0;x<=2;x++){
-
if (x==(i-1)) { text += '<img src="https://static.igem.org/mediawiki/2013/9/9d/Goe-this.png" />' ;}
+
if (x==(picSlide_i-1)) { text += '<img src="https://static.igem.org/mediawiki/2013/9/9d/Goe-this.png" />' ;}
-
else { text += '<img src="https://static.igem.org/mediawiki/2013/4/4c/Goe-notThis.png" onclick="i = ' + x + ';stopslide(); startslide()" />';}
+
else { text += '<img src="https://static.igem.org/mediawiki/2013/4/4c/Goe-notThis.png" onclick="picSlide_i = ' + x + ';stopslide(); startslide()" />';}
};
};
text += '</span>';
text += '</span>';
Line 81: Line 81:
function go2left(){
function go2left(){
stoptimer();
stoptimer();
-
if (i == 0) i = 3;
+
if (picSlide_i == 0) picSlide_i = 3;
-
i = i - 2;
+
picSlide_i = picSlide_i - 2;
-
if (i < 0) i =2;
+
if (picSlide_i < 0) picSlide_i =2;
fadeInOut();
fadeInOut();
}
}

Revision as of 17:50, 26 June 2013