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( | + | //alert(picSlide_i); |
- | document.getElementById("slide").src=e[ | + | document.getElementById("slide").src=e[picSlide_i]; |
- | document.getElementById("slide-a").href = link[ | + | document.getElementById("slide-a").href = link[picSlide_i]; |
- | + | picSlide_i++; | |
- | //alert( | + | //alert(picSlide_i); |
$("#slide").fadeIn(300,slide_ctrl()); | $("#slide").fadeIn(300,slide_ctrl()); | ||
}); | }); | ||
Line 47: | Line 47: | ||
function startslide() | function startslide() | ||
{ | { | ||
- | if( | + | 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==( | + | 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=" | + | 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 ( | + | if (picSlide_i == 0) picSlide_i = 3; |
- | + | picSlide_i = picSlide_i - 2; | |
- | if ( | + | if (picSlide_i < 0) picSlide_i =2; |
fadeInOut(); | fadeInOut(); | ||
} | } |
Revision as of 17:50, 26 June 2013