Template:Sifuentes04

From 2014.igem.org

(Difference between revisions)
Line 300: Line 300:
<script type="text/javascript">
<script type="text/javascript">
-
var galimgn = 0;
+
var arrayPosition = 0;
var imgname = new Array();
var imgname = new Array();
Line 333: Line 333:
function moveLeft() {
function moveLeft() {
-
galimgn -= 1;
+
arrayPosition -= 1;
-
if (galimgn < 0)
+
if (arrayPosition < 0)
-
galimgn = imgname.length - 1;
+
arrayPosition = imgname.length - 1;
-
changeImg(galimgn);
+
changeImg(arrayPosition);
-
changeText(galimgn);
+
changeText(arrayPosition);
-
changeTitle(galimgn);
+
changeTitle(arrayPosition);
}
}
function moveRight() {
function moveRight() {
-
galimgn += 1;
+
arrayPosition += 1;
-
if (galimgn >= imgname.length)
+
if (arrayPosition >= imgname.length)
-
galimgn = 0;
+
arrayPosition = 0;
-
changeImg(galimgn);
+
changeImg(arrayPosition);
-
changeText(galimgn);
+
changeText(arrayPosition);
-
changeTitle(galimgn);
+
changeTitle(arrayPosition);
}
}

Revision as of 17:08, 13 January 2015