Template:Sifuentes04

From 2014.igem.org

(Difference between revisions)
Line 287: Line 287:
-
<!-- javascript for the featurebox -->
+
<!-- javascript for the featurebox -->
-
<script type="text/javascript">
+
<script type="text/javascript">
-
var galimgn = 0;
+
var galimgn = 0;
-
var imgname = new Array();
+
var imgname = new Array();
-
imgname[0] = "https://static.igem.org/mediawiki/2011/c/cb/Img022.png";
+
imgname[0] = "https://static.igem.org/mediawiki/2011/c/cb/Img022.png";
-
imgname[1] = "https://static.igem.org/mediawiki/2014/4/4c/Featureboxdemo.jpg";
+
imgname[1] = "https://static.igem.org/mediawiki/2014/4/4c/Featureboxdemo.jpg";
-
imgname[2] = "https://static.igem.org/mediawiki/2011/b/b1/Img021.png";
+
imgname[2] = "https://static.igem.org/mediawiki/2011/b/b1/Img021.png";
-
var textFeatureBox = new Array();
+
var textFeatureBox = new Array();
-
textFeatureBox[0] = "text 01";
+
textFeatureBox[0] = "text 01";
-
textFeatureBox[1] = "text 02";
+
textFeatureBox[1] = "text 02";
-
textFeatureBox[2] = "text 03";
+
textFeatureBox[2] = "text 03";
-
function changeText(n) {
+
function changeText(n) {
-
var imgtext = textFeatureBox[n];
+
var imgtext = textFeatureBox[n];
-
        document.getElementById("featureText").innerHTML = imgtext;
+
document.getElementById("featureText").innerHTML = imgtext;
-
}
+
}
-
function changeImg(n) {
+
function changeImg(n) {
-
var imgobj = document.getElementById('galImg');
+
var imgobj = document.getElementById('galImg');
-
imgobj.src = imgname[n];
+
imgobj.src = imgname[n];
-
}
+
}
-
function moveLeft()  
+
function moveLeft() {
-
{
+
galimgn -= 1;
-
galimgn -= 1;
+
if (galimgn < 0)
-
if (galimgn < 0)
+
galimgn = imgname.length - 1;
-
galimgn = imgname.length - 1;
+
changeImg(galimgn);
-
changeImg(galimgn);
+
changeText(galimgn);
-
changeText(galimgn);
+
}
-
}
+
-
function moveRight()  
+
 
-
{
+
function moveRight() {
-
galimgn += 1;
+
galimgn += 1;
-
if (galimgn >= imgname.length)
+
if (galimgn >= imgname.length)
-
galimgn = 0;
+
galimgn = 0;
-
changeImg(galimgn);
+
changeImg(galimgn);
-
changeText(galimgn);
+
changeText(galimgn);
-
}
+
}
-
 
+
-
 
+
-
 
+
-
 
+
-
</script>
+
-
 
+
-
 
+
-
 
+
-
 
+
-
 
+
-
 
+
-
 
+
-
 
+
 +
</script>
-
<!-- jquery -->
+
<!-- jquery -->
<script ="text/javascript">
<script ="text/javascript">

Revision as of 16:05, 13 January 2015