Template:Sifuentes04

From 2014.igem.org

(Difference between revisions)
Line 302: Line 302:
var arrayPosition = 0;
var arrayPosition = 0;
-
var imgname = new Array();
+
var imgFeatureBox= new Array();
-
imgname[0] = "https://static.igem.org/mediawiki/2011/c/cb/Img022.png";
+
imgFeatureBox[0] = "https://static.igem.org/mediawiki/2011/c/cb/Img022.png";
-
imgname[1] = "https://static.igem.org/mediawiki/2014/4/4c/Featureboxdemo.jpg";
+
imgFeatureBox[1] = "https://static.igem.org/mediawiki/2014/4/4c/Featureboxdemo.jpg";
-
imgname[2] = "https://static.igem.org/mediawiki/2011/b/b1/Img021.png";
+
imgFeatureBox[2] = "https://static.igem.org/mediawiki/2011/b/b1/Img021.png";
Line 329: Line 329:
function changeImg(n) {
function changeImg(n) {
var imgobj = document.getElementById('imageNumber');
var imgobj = document.getElementById('imageNumber');
-
imgobj.src = imgname[n];
+
imgobj.src =imgFeatureBox[n];
}
}
Line 335: Line 335:
arrayPosition -= 1;
arrayPosition -= 1;
if (arrayPosition < 0)
if (arrayPosition < 0)
-
arrayPosition = imgname.length - 1;
+
arrayPosition = imgFeatureBox.length - 1;
changeImg(arrayPosition);
changeImg(arrayPosition);
Line 345: Line 345:
function moveRight() {
function moveRight() {
arrayPosition += 1;
arrayPosition += 1;
-
if (arrayPosition >= imgname.length)
+
if (arrayPosition >= imgFeatureBox.length)
arrayPosition = 0;
arrayPosition = 0;

Revision as of 17:10, 13 January 2015